aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2007-03-14 22:03:59 +0100
committerUros Bizjak <uros@gcc.gnu.org>2007-03-14 22:03:59 +0100
commit38ca3765253c05cc3bdba77c942c2a00b0da132d (patch)
tree607098977428b569ac568220d0c2c564dc2232f5 /gcc
parente9f646295d8d233b95d43a60cf2e596f38469c3e (diff)
downloadgcc-38ca3765253c05cc3bdba77c942c2a00b0da132d.zip
gcc-38ca3765253c05cc3bdba77c942c2a00b0da132d.tar.gz
gcc-38ca3765253c05cc3bdba77c942c2a00b0da132d.tar.bz2
configure.ac (HAVE_AS_IX86_SAHF): On x86 targets check whether the configured assembler supports the sahf mnemonic.
* 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. From-SVN: r122931
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/config.in6
-rw-r--r--gcc/config/i386/i386.md2
-rwxr-xr-xgcc/configure33
-rw-r--r--gcc/configure.ac6
5 files changed, 56 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 16f70d1..3cb3328 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/config.in b/gcc/config.in
index 9906ad7..69f7e9e 100644
--- a/gcc/config.in
+++ b/gcc/config.in
@@ -228,6 +228,12 @@
#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
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index f3fb848..4d3120d 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -988,7 +988,7 @@
(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")
diff --git a/gcc/configure b/gcc/configure
index 488794b..de3f628 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -15237,6 +15237,39 @@ _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
echo $ECHO_N "checking assembler for different section symbol subtraction... $ECHO_C" >&6
if test "${gcc_cv_as_ix86_diff_sect_delta+set}" = set; then
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 768cff0..18134ca 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -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