]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: re PR target/43733 (bootstrap fails on Solaris 10 x86 with GNU as 2.15...
authorUros Bizjak <ubizjak@gmail.com>
Mon, 24 May 2010 16:28:53 +0000 (18:28 +0200)
committerUros Bizjak <uros@gcc.gnu.org>
Mon, 24 May 2010 16:28:53 +0000 (18:28 +0200)
Backport from mainline:
2010-05-20  Uros Bizjak  <ubizjak@gmail.com>

PR target/43733
* configure.ac (gcc_cv_as_ix86_sahf): Switch to 64bit mode.
* configure: Regenerate.
* config.in: Regenerate.
* config/i386/i386.md (x86_sahf_1): Conditionally output 0x9e
instead of sahf only for 64bit targets.

From-SVN: r159787

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

index 0f9dbcd1537b0d9d4bbe5a83e35fb0cf2864279d..d062536754f16fadf817a625a8340c537baa4643 100644 (file)
@@ -1,3 +1,15 @@
+2010-05-24  Uros Bizjak  <ubizjak@gmail.com>
+
+       Backport from mainline:
+       2010-05-20  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR target/43733
+       * configure.ac (gcc_cv_as_ix86_sahf): Switch to 64bit mode.
+       * configure: Regenerate.
+       * config.in: Regenerate.
+       * config/i386/i386.md (x86_sahf_1): Conditionally output 0x9e
+       instead of sahf only for 64bit targets.
+
 2010-05-22  Richard Guenther  <rguenther@suse.de>
 
        * BASE-VER: Set to 4.3.6.
index 723b88fc8e7a1baee6996ad058d728163a96760d..c61ce5269b7d4c5c483b597db886823415bd1be3 100644 (file)
 #endif
 
 
-/* Define if your assembler supports the sahf mnemonic. */
+/* Define if your assembler supports the sahf mnemonic in 64bit mode. */
 #ifndef USED_FOR_TARGET
 #undef HAVE_AS_IX86_SAHF
 #endif
index 8370b810c053b0694c56265510dc2e8e87dccb74..c5f8e173de7c2acf5132b597bf77bfb582177167 100644 (file)
                   UNSPEC_SAHF))]
   "TARGET_SAHF"
 {
-#ifdef HAVE_AS_IX86_SAHF
-  return "sahf";
-#else
-  return ".byte\t0x9e";
+#ifndef HAVE_AS_IX86_SAHF
+  if (TARGET_64BIT)
+    return ".byte\t0x9e";
+  else
 #endif
+  return "sahf";
 }
   [(set_attr "length" "1")
    (set_attr "athlon_decode" "vector")
index f7d4161e8ac57e6fb36bc93070a48bf18ddf6d81..3e2fa4ea0c10a6f4728a38ebb81e297848edce56 100755 (executable)
@@ -21369,7 +21369,8 @@ if test "${gcc_cv_as_ix86_sahf+set}" = set; then
 else
   gcc_cv_as_ix86_sahf=no
   if test x$gcc_cv_as != x; then
-    echo 'sahf' > conftest.s
+    echo '.code64
+       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
index 057c4804bbe1472f202b7bd19a3fa90d1b97310f..5a7f2440ea69cbe758110d7a3aa76ce1fd06d68d 100644 (file)
@@ -2850,9 +2850,10 @@ foo:     nop
 
     gcc_GAS_CHECK_FEATURE([sahf mnemonic],
       gcc_cv_as_ix86_sahf,,,
-      [sahf],,
+      [.code64
+       sahf],,
       [AC_DEFINE(HAVE_AS_IX86_SAHF, 1,
-        [Define if your assembler supports the sahf mnemonic.])])
+        [Define if your assembler supports the sahf mnemonic in 64bit mode.])])
 
     gcc_GAS_CHECK_FEATURE([different section symbol subtraction],
       gcc_cv_as_ix86_diff_sect_delta,,,