OSDN Git Service

PR target/43733
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 20 May 2010 18:52:03 +0000 (18:52 +0000)
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 20 May 2010 18:52:03 +0000 (18:52 +0000)
* 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.

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

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

index 769697c..520bbb6 100644 (file)
@@ -1,3 +1,12 @@
+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-20  Jakub Jelinek  <jakub@redhat.com>
 
        PR debug/44178
 2010-05-20  Jakub Jelinek  <jakub@redhat.com>
 
        PR debug/44178
index a1c117a..86b237b 100644 (file)
 #endif
 
 
 #endif
 
 
-/* Define true if the assembler supports 'rep <insn>, lock <insn>'. */
+/* Define if your assembler supports the .quad directive. */
 #ifndef USED_FOR_TARGET
 #ifndef USED_FOR_TARGET
-#undef HAVE_AS_IX86_REP_LOCK_PREFIX
+#undef HAVE_AS_IX86_QUAD
 #endif
 
 
 #endif
 
 
-/* Define if your assembler supports the .quad directive. */
+/* Define true if the assembler supports 'rep <insn>, lock <insn>'. */
 #ifndef USED_FOR_TARGET
 #ifndef USED_FOR_TARGET
-#undef HAVE_AS_IX86_QUAD
+#undef HAVE_AS_IX86_REP_LOCK_PREFIX
 #endif
 
 
 #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
 #ifndef USED_FOR_TARGET
 #undef HAVE_AS_IX86_SAHF
 #endif
index 35b2f21..2dd6699 100644 (file)
                   UNSPEC_SAHF))]
   "TARGET_SAHF"
 {
                   UNSPEC_SAHF))]
   "TARGET_SAHF"
 {
-#ifdef HAVE_AS_IX86_SAHF
-  return "sahf";
-#else
-  return ASM_BYTE "0x9e";
+#ifndef HAVE_AS_IX86_SAHF
+  if (TARGET_64BIT)
+    return ASM_BYTE "0x9e";
+  else
 #endif
 #endif
+  return "sahf";
 }
   [(set_attr "length" "1")
    (set_attr "athlon_decode" "vector")
 }
   [(set_attr "length" "1")
    (set_attr "athlon_decode" "vector")
index 82f6504..8013a15 100755 (executable)
@@ -23195,7 +23195,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
 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 $gcc_cv_as_flags  -o conftest.o conftest.s >&5'
   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
   (eval $ac_try) 2>&5
     if { ac_try='$gcc_cv_as $gcc_cv_as_flags  -o conftest.o conftest.s >&5'
   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
   (eval $ac_try) 2>&5
index 15b126f..a80900c 100644 (file)
@@ -3288,9 +3288,10 @@ foo:     nop
 
     gcc_GAS_CHECK_FEATURE([sahf mnemonic],
       gcc_cv_as_ix86_sahf,,,
 
     gcc_GAS_CHECK_FEATURE([sahf mnemonic],
       gcc_cv_as_ix86_sahf,,,
-      [sahf],,
+      [.code64
+       sahf],,
       [AC_DEFINE(HAVE_AS_IX86_SAHF, 1,
       [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([swap suffix],
       gcc_cv_as_ix86_swap,,,
 
     gcc_GAS_CHECK_FEATURE([swap suffix],
       gcc_cv_as_ix86_swap,,,