diff options
author | Uros Bizjak <uros@kss-loka.si> | 2004-05-07 16:29:41 +0200 |
---|---|---|
committer | Roger Sayle <sayle@gcc.gnu.org> | 2004-05-07 14:29:41 +0000 |
commit | 2484cc35b0b0b9467d831cbe3d140bb86295ce49 (patch) | |
tree | b336f2bb4d8da1c705e8f8343a0226dd9e467ca4 | |
parent | 7600f0944bacf83072ecd8e275f83e8c06ccf980 (diff) | |
download | gcc-2484cc35b0b0b9467d831cbe3d140bb86295ce49.zip gcc-2484cc35b0b0b9467d831cbe3d140bb86295ce49.tar.gz gcc-2484cc35b0b0b9467d831cbe3d140bb86295ce49.tar.bz2 |
i386.c (ix86_emit_fp_unordered_jump): Use testb $4, %ah insn instead of sahf insn if !TARGET_USE_SAHF.
2004-05-07 Uros Bizjak <uros@kss-loka.si>
* config/i386/i386.c (ix86_emit_fp_unordered_jump): Use
testb $4, %ah insn instead of sahf insn if !TARGET_USE_SAHF.
From-SVN: r81620
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 18 |
2 files changed, 21 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a463236..b97024e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-05-07 Uros Bizjak <uros@kss-loka.si> + + * config/i386/i386.c (ix86_emit_fp_unordered_jump): Use + testb $4, %ah insn instead of sahf insn if !TARGET_USE_SAHF. + 2004-05-07 Andrew Pinski <pinskia@physics.uc.edu> * loop-doloop.c (doloop_valid_p): Make sure that body @@ -75,6 +80,7 @@ (STACK_BOUNDARY): Delete. 2004-05-06 Stuart Hastings <stuart@apple.com> + * gcc/doc/invoke.texi: Restore -fgcse-after-reload doc from 1.421, mistakenly clobbered by 1.423. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 0a45e3e..9e8fdf4 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -15938,10 +15938,22 @@ ix86_emit_fp_unordered_jump (rtx label) rtx temp; emit_insn (gen_x86_fnstsw_1 (reg)); - emit_insn (gen_x86_sahf_1 (reg)); + + if (TARGET_USE_SAHF) + { + emit_insn (gen_x86_sahf_1 (reg)); + + temp = gen_rtx_REG (CCmode, FLAGS_REG); + temp = gen_rtx_UNORDERED (VOIDmode, temp, const0_rtx); + } + else + { + emit_insn (gen_testqi_ext_ccno_0 (reg, GEN_INT (0x04))); + + temp = gen_rtx_REG (CCNOmode, FLAGS_REG); + temp = gen_rtx_NE (VOIDmode, temp, const0_rtx); + } - temp = gen_rtx_REG (CCmode, FLAGS_REG); - temp = gen_rtx_UNORDERED (VOIDmode, temp, const0_rtx); temp = gen_rtx_IF_THEN_ELSE (VOIDmode, temp, gen_rtx_LABEL_REF (VOIDmode, label), pc_rtx); |