Failure introduced by the sahf patch(es)

Uros Bizjak ubizjak@gmail.com
Thu Mar 15 11:08:00 GMT 2007


On 3/15/07, François-Xavier Coudert <fxcoudert@gmail.com> wrote:

> but on my system, the assembler doesn't recognize sahf. Thus
> HAVE_AS_IX86_SAHF is not defined. The above code should be changed
> into a ifdef:

Uh, shame on me!

I have slightly changed your patch (thanks!) and commited it to SVN.
Patch was bootstrapped on i686-pc-linux-gnu.

2007-03-15  Uros Bizjak  <ubizjak@gmail.com>
            Francois-Xavier Coudert  <coudert@clipper.ens.fr>

        * config/i386/i386.md (x86_sahf_1): Correctly handle
        HAVE_AS_IX86_SAHF.


Thanks again,
Uros

Index: config/i386/i386.md
===================================================================
--- config/i386/i386.md (revision 122945)
+++ config/i386/i386.md (working copy)
@@ -988,7 +988,13 @@
        (unspec:CC [(match_operand:HI 0 "register_operand" "a")]
                   UNSPEC_SAHF))]
   "TARGET_SAHF"
-  "* return HAVE_AS_IX86_SAHF ? \"sahf\" : \".byte\t0x9e\";"
+{
+#ifdef HAVE_AS_IX86_SAHF
+  return "sahf";
+#else
+  return ".byte\t0x9e";
+#endif
+}
   [(set_attr "length" "1")
    (set_attr "athlon_decode" "vector")
    (set_attr "amdfam10_decode" "direct")



More information about the Gcc-patches mailing list