+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.
#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
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")
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
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,,,