public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, i386]: Fix gcc.target/i386/sse4_1-round-roundeven-2.c execution test failure
@ 2019-08-26 19:56 Uros Bizjak
  0 siblings, 0 replies; only message in thread
From: Uros Bizjak @ 2019-08-26 19:56 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 299 bytes --]

We have to negate masking value to clear certain bits.

2019-08-26  Uroš Bizjak  <ubizjak@gmail.com>

    * config/i386/i386.c (emit_i387_cw_initialization)
    <case I387_CW_ROUNDEVEN>: Fix masking operand value.

Tested on x86_64-linux-gnu {,-m32} and committed to mainline SVN.

Uros.

[-- Attachment #2: p.diff.txt --]
[-- Type: text/plain, Size: 472 bytes --]

Index: config/i386/i386.c
===================================================================
--- config/i386/i386.c	(revision 274930)
+++ config/i386/i386.c	(working copy)
@@ -13785,7 +13785,7 @@ emit_i387_cw_initialization (int mode)
     {
     case I387_CW_ROUNDEVEN:
       /* round to nearest */
-      emit_insn (gen_andhi3 (reg, reg, GEN_INT (0x0c00)));
+      emit_insn (gen_andhi3 (reg, reg, GEN_INT (~0x0c00)));
       slot = SLOT_CW_ROUNDEVEN;
       break;
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-08-26 19:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-26 19:56 [PATCH, i386]: Fix gcc.target/i386/sse4_1-round-roundeven-2.c execution test failure Uros Bizjak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).