Commit 7471a1f0 by Alexandre Oliva Committed by Alexandre Oliva

i386.c (ix86_expand_int_movcc, [...]): Sign-extend CONST_INTs.

* config/i386/i386.c (ix86_expand_int_movcc,
ix86_expand_strlensi_unroll_1): Sign-extend CONST_INTs.

From-SVN: r41454
parent 99ffe40f
2001-04-20 Alexandre Oliva <aoliva@redhat.com>
* config/i386/i386.c (ix86_expand_int_movcc,
ix86_expand_strlensi_unroll_1): Sign-extend CONST_INTs.
2001-04-20 Geoff Keating <geoffk@redhat.com> 2001-04-20 Geoff Keating <geoffk@redhat.com>
* config/rs6000/rs6000.md (ctrsi_internal1, ctrsi_internal2, * config/rs6000/rs6000.md (ctrsi_internal1, ctrsi_internal2,
......
...@@ -6316,7 +6316,8 @@ ix86_expand_int_movcc (operands) ...@@ -6316,7 +6316,8 @@ ix86_expand_int_movcc (operands)
* *
* Size 8 - 11. * Size 8 - 11.
*/ */
emit_insn (gen_andsi3 (out, out, GEN_INT (cf - ct))); emit_insn (gen_andsi3 (out, out, GEN_INT (trunc_int_for_mode
(cf - ct, SImode))));
if (ct) if (ct)
emit_insn (gen_addsi3 (out, out, GEN_INT (ct))); emit_insn (gen_addsi3 (out, out, GEN_INT (ct)));
} }
...@@ -6473,7 +6474,8 @@ ix86_expand_int_movcc (operands) ...@@ -6473,7 +6474,8 @@ ix86_expand_int_movcc (operands)
ix86_compare_op1, VOIDmode, 0, 1); ix86_compare_op1, VOIDmode, 0, 1);
emit_insn (gen_addsi3 (out, out, constm1_rtx)); emit_insn (gen_addsi3 (out, out, constm1_rtx));
emit_insn (gen_andsi3 (out, out, GEN_INT (cf-ct))); emit_insn (gen_andsi3 (out, out, GEN_INT (trunc_int_for_mode
(cf - ct, SImode))));
if (ct != 0) if (ct != 0)
emit_insn (gen_addsi3 (out, out, GEN_INT (ct))); emit_insn (gen_addsi3 (out, out, GEN_INT (ct)));
if (out != operands[0]) if (out != operands[0])
...@@ -7886,7 +7888,9 @@ ix86_expand_strlensi_unroll_1 (out, align_rtx) ...@@ -7886,7 +7888,9 @@ ix86_expand_strlensi_unroll_1 (out, align_rtx)
emit_insn (gen_addsi3 (tmpreg, scratch, GEN_INT (-0x01010101))); emit_insn (gen_addsi3 (tmpreg, scratch, GEN_INT (-0x01010101)));
emit_insn (gen_one_cmplsi2 (scratch, scratch)); emit_insn (gen_one_cmplsi2 (scratch, scratch));
emit_insn (gen_andsi3 (tmpreg, tmpreg, scratch)); emit_insn (gen_andsi3 (tmpreg, tmpreg, scratch));
emit_insn (gen_andsi3 (tmpreg, tmpreg, GEN_INT (0x80808080))); emit_insn (gen_andsi3 (tmpreg, tmpreg,
GEN_INT (trunc_int_for_mode
(0x80808080, SImode))));
emit_cmp_and_jump_insns (tmpreg, const0_rtx, EQ, 0, emit_cmp_and_jump_insns (tmpreg, const0_rtx, EQ, 0,
SImode, 1, 0, align_4_label); SImode, 1, 0, align_4_label);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment