summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog11
-rw-r--r--gcc/config.in6
-rw-r--r--gcc/config/darwin.c10
-rwxr-xr-xgcc/configure37
-rw-r--r--gcc/configure.ac6
5 files changed, 68 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e4bf33d2978..fa68d1c0c24 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,16 @@
+2007-01-01 Mike Stump <mrs@apple.com>
+
+ * configure.ac (HAVE_GAS_LITERAL16): Add autoconf check for
+ .literal16.
+ * config/darwin.c (machopic_select_rtx_section): Use
+ HAVE_GAS_LITERAL16.
+ (darwin_mergeable_constant_section): Likewise.
+ * configure: Regenerate.
+ * config.in: Regenerate.
+
2007-01-01 Jan Hubicka <jh@suse.cz>
Andrew Pinski <pinskia@gmail.com>
* cgraphunit.c (cgraph_optimize): Call cgraph_add_new_functions
before starting IPA passes.
+
diff --git a/gcc/config.in b/gcc/config.in
index a8e18bc3bb7..e1a530a12e4 100644
--- a/gcc/config.in
+++ b/gcc/config.in
@@ -754,6 +754,12 @@
/* Define if your assembler and linker support .hidden. */
#undef HAVE_GAS_HIDDEN
+/* Define if your assembler supports .literal16. */
+#ifndef USED_FOR_TARGET
+#undef HAVE_GAS_LITERAL16
+#endif
+
+
/* Define if your assembler supports specifying the maximum number of bytes to
skip when using the GAS .p2align command. */
#ifndef USED_FOR_TARGET
diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c
index 385b89269c0..1c7747cc04c 100644
--- a/gcc/config/darwin.c
+++ b/gcc/config/darwin.c
@@ -1131,6 +1131,10 @@ darwin_mergeable_string_section (tree exp,
return readonly_data_section;
}
+#ifndef HAVE_GAS_LITERAL16
+#define HAVE_GAS_LITERAL16 0
+#endif
+
static section *
darwin_mergeable_constant_section (tree exp,
unsigned HOST_WIDE_INT align)
@@ -1156,7 +1160,8 @@ darwin_mergeable_constant_section (tree exp,
&& TREE_INT_CST_LOW (size) == 8
&& TREE_INT_CST_HIGH (size) == 0)
return darwin_sections[literal8_section];
- else if (TARGET_64BIT
+ else if (HAVE_GAS_LITERAL16
+ && TARGET_64BIT
&& TREE_CODE (size) == INTEGER_CST
&& TREE_INT_CST_LOW (size) == 16
&& TREE_INT_CST_HIGH (size) == 0)
@@ -1321,7 +1326,8 @@ machopic_select_rtx_section (enum machine_mode mode, rtx x,
&& (GET_CODE (x) == CONST_INT
|| GET_CODE (x) == CONST_DOUBLE))
return darwin_sections[literal4_section];
- else if (TARGET_64BIT
+ else if (HAVE_GAS_LITERAL16
+ && TARGET_64BIT
&& GET_MODE_SIZE (mode) == 16
&& (GET_CODE (x) == CONST_INT
|| GET_CODE (x) == CONST_DOUBLE
diff --git a/gcc/configure b/gcc/configure
index 09fc0aa6108..3aaf361cf40 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -13737,6 +13737,43 @@ _ACEOF
fi
+echo "$as_me:$LINENO: checking assembler for .literal16" >&5
+echo $ECHO_N "checking assembler for .literal16... $ECHO_C" >&6
+if test "${gcc_cv_as_literal16+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ gcc_cv_as_literal16=no
+ if test $in_tree_gas = yes; then
+ if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0`
+ then gcc_cv_as_literal16=yes
+fi
+ elif test x$gcc_cv_as != x; then
+ echo '.literal16' > 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_literal16=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_literal16" >&5
+echo "${ECHO_T}$gcc_cv_as_literal16" >&6
+if test $gcc_cv_as_literal16 = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GAS_LITERAL16 1
+_ACEOF
+
+fi
+
echo "$as_me:$LINENO: checking assembler for working .subsection -1" >&5
echo $ECHO_N "checking assembler for working .subsection -1... $ECHO_C" >&6
if test "${gcc_cv_as_subsection_m1+set}" = set; then
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 706735ee95d..a0832bf5125 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -2051,6 +2051,12 @@ gcc_GAS_CHECK_FEATURE([.p2align with maximum skip], gcc_cv_as_max_skip_p2align,
[Define if your assembler supports specifying the maximum number
of bytes to skip when using the GAS .p2align command.])])
+gcc_GAS_CHECK_FEATURE([.literal16], gcc_cv_as_literal16,
+ [2,8,0],,
+ [.literal16],,
+[AC_DEFINE(HAVE_GAS_LITERAL16, 1,
+ [Define if your assembler supports .literal16.])])
+
gcc_GAS_CHECK_FEATURE([working .subsection -1], gcc_cv_as_subsection_m1,
[elf,2,9,0],,
[conftest_label1: .word 0