[PATCH, i386]: Fix gcc.target/i386/sse4_1-round-roundeven-2.c execution test failure
Uros Bizjak
ubizjak@gmail.com
Mon Aug 26 19:56:00 GMT 2019
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.
-------------- next part --------------
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;
More information about the Gcc-patches
mailing list