From: Uros Bizjak Date: Fri, 7 May 2004 14:29:41 +0000 (+0200) Subject: i386.c (ix86_emit_fp_unordered_jump): Use testb $4, %ah insn instead of sahf insn... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2484cc35b0b0b9467d831cbe3d140bb86295ce49;p=gcc.git 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 * 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a4632360b52..b97024e13e6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-05-07 Uros Bizjak + + * 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 * loop-doloop.c (doloop_valid_p): Make sure that body @@ -75,6 +80,7 @@ (STACK_BOUNDARY): Delete. 2004-05-06 Stuart Hastings + * 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 0a45e3e95d5..9e8fdf48d0e 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);