i386.c (ix86_emit_fp_unordered_jump): Use testb $4, %ah insn instead of sahf insn...
authorUros Bizjak <uros@kss-loka.si>
Fri, 7 May 2004 14:29:41 +0000 (16:29 +0200)
committerRoger Sayle <sayle@gcc.gnu.org>
Fri, 7 May 2004 14:29:41 +0000 (14:29 +0000)
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

gcc/ChangeLog
gcc/config/i386/i386.c

index a4632360b52c570268f60e2d9489b4aff1f3be9a..b97024e13e6a5caa16e991932ce3ee91993e65a7 100644 (file)
@@ -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.
 
index 0a45e3e95d5453093b165b241129f512e18070b9..9e8fdf48d0e4d93067470eb1b4c3afe12d49f910 100644 (file)
@@ -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);