]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* configure.ac (HAVE_AS_IX86_SAHF): On x86 targets check whether
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 14 Mar 2007 21:03:59 +0000 (21:03 +0000)
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 14 Mar 2007 21:03:59 +0000 (21:03 +0000)
        the configured assembler supports the sahf mnemonic.
        * configure: Regenerate.
        * config.in: Regenerate.

        * config/i386/i386.md (x86_sahf_1): Depending on HAVE_AS_IX86_SAHF,
        emit "sahf" or ".byte\t0x9e" as asm template.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122931 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config.in
gcc/config/i386/i386.md
gcc/configure
gcc/configure.ac

index 16f70d157b352833311818ceed4d8ab21af86d49..3cb33283abaddbec644ee8fd8ab02e1df0fe6aa8 100644 (file)
@@ -1,3 +1,13 @@
+2007-03-14  Uros Bizjak  <ubizjak@gmail.com>
+
+       * configure.ac (HAVE_AS_IX86_SAHF): On x86 targets check whether
+       the configured assembler supports the sahf mnemonic.
+       * configure: Regenerate.
+       * config.in: Regenerate.
+
+       * config/i386/i386.md (x86_sahf_1): Depending on HAVE_AS_IX86_SAHF,
+       emit "sahf" or ".byte\t0x9e" as asm template.
+
 2007-03-14  Michael Meissner  <michael.meissner@amd.com>
 
        PR 31018
index 9906ad71fdaa2b4c7e8c922b0d07f47bc4f4466f..69f7e9e65b8ff6330dd8c4cb4e69c3189b1de852 100644 (file)
 #endif
 
 
+/* Define if your assembler supports the sahf mnemonic. */
+#ifndef USED_FOR_TARGET
+#undef HAVE_AS_IX86_SAHF
+#endif
+
+
 /* Define if your assembler supports the lituse_jsrdirect relocation. */
 #ifndef USED_FOR_TARGET
 #undef HAVE_AS_JSRDIRECT_RELOCS
index f3fb8487590bc5d7cebec1c42be4009788a14ee2..4d3120dff8659b43b959cc05d1c7692cdaec3f66 100644 (file)
        (unspec:CC [(match_operand:HI 0 "register_operand" "a")]
                   UNSPEC_SAHF))]
   "TARGET_SAHF"
-  "sahf"
+  "* return HAVE_AS_IX86_SAHF ? \"sahf\" : \".byte\t0x9e\";"
   [(set_attr "length" "1")
    (set_attr "athlon_decode" "vector")
    (set_attr "amdfam10_decode" "direct")
index 488794bcd2508017150bd2e820897f59488be0f1..de3f6289b9e6991e01fe09422ee8a7fd8cba0845 100755 (executable)
@@ -15235,6 +15235,39 @@ cat >>confdefs.h <<\_ACEOF
 #define HAVE_AS_IX86_FFREEP 1
 _ACEOF
 
+fi
+
+    echo "$as_me:$LINENO: checking assembler for sahf mnemonic" >&5
+echo $ECHO_N "checking assembler for sahf mnemonic... $ECHO_C" >&6
+if test "${gcc_cv_as_ix86_sahf+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  gcc_cv_as_ix86_sahf=no
+  if test x$gcc_cv_as != x; then
+    echo 'sahf' > conftest.s
+    if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }
+    then
+       gcc_cv_as_ix86_sahf=yes
+    else
+      echo "configure: failed program was" >&5
+      cat conftest.s >&5
+    fi
+    rm -f conftest.o conftest.s
+  fi
+fi
+echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_sahf" >&5
+echo "${ECHO_T}$gcc_cv_as_ix86_sahf" >&6
+if test $gcc_cv_as_ix86_sahf = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_AS_IX86_SAHF 1
+_ACEOF
+
 fi
 
     echo "$as_me:$LINENO: checking assembler for different section symbol subtraction" >&5
index 768cff05208f07eae492afb36c3e380367df740f..18134cae8fbbb0d71cbe17f2bbcfcb5c2f7800e8 100644 (file)
@@ -2808,6 +2808,12 @@ foo:     nop
       [AC_DEFINE(HAVE_AS_IX86_FFREEP, 1,
         [Define if your assembler supports the ffreep mnemonic.])])
 
+    gcc_GAS_CHECK_FEATURE([sahf mnemonic],
+      gcc_cv_as_ix86_sahf,,,
+      [sahf],,
+      [AC_DEFINE(HAVE_AS_IX86_SAHF, 1,
+        [Define if your assembler supports the sahf mnemonic.])])
+
     gcc_GAS_CHECK_FEATURE([different section symbol subtraction],
       gcc_cv_as_ix86_diff_sect_delta,,,
       [.section .rodata