Commit 3a37b08e by Richard Henderson Committed by Richard Henderson

alpha.h (TARGET_SWITCHES): Turn on MASK_EXPLICIT_RELOCS if the assembler supports it.

        * config/alpha/alpha.h (TARGET_SWITCHES): Turn on
        MASK_EXPLICIT_RELOCS if the assembler supports it.
        * configure.in (HAVE_AS_EXPLICIT_RELOCS): New.
        * configure, config.in: Rebuild.

From-SVN: r48054
parent bd1f4738
2001-12-15 Richard Henderson <rth@redhat.com>
* config/alpha/alpha.h (TARGET_SWITCHES): Turn on
MASK_EXPLICIT_RELOCS if the assembler supports it.
* configure.in (HAVE_AS_EXPLICIT_RELOCS): New.
* configure, config.in: Rebuild.
Sat Dec 15 17:53:03 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> Sat Dec 15 17:53:03 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* calls.c (emit_call_1): If ECF_SP_DEPRESSED, pretend have adjusted * calls.c (emit_call_1): If ECF_SP_DEPRESSED, pretend have adjusted
......
...@@ -526,6 +526,9 @@ ...@@ -526,6 +526,9 @@
/* Define if your assembler supports marking sections with SHF_MERGE flag. */ /* Define if your assembler supports marking sections with SHF_MERGE flag. */
#undef HAVE_GAS_SHF_MERGE #undef HAVE_GAS_SHF_MERGE
/* Define if your assembler supports explicit relocations. */
#undef HAVE_AS_EXPLICIT_RELOCS
/* Define if your assembler supports .register. */ /* Define if your assembler supports .register. */
#undef HAVE_AS_REGISTER_PSEUDO_OP #undef HAVE_AS_REGISTER_PSEUDO_OP
......
...@@ -251,7 +251,8 @@ extern enum alpha_fp_trap_mode alpha_fptm; ...@@ -251,7 +251,8 @@ extern enum alpha_fp_trap_mode alpha_fptm;
N_("Emit 16-bit relocations to the small data areas")}, \ N_("Emit 16-bit relocations to the small data areas")}, \
{"large-data", -MASK_SMALL_DATA, \ {"large-data", -MASK_SMALL_DATA, \
N_("Emit 32-bit relocations to the small data areas")}, \ N_("Emit 32-bit relocations to the small data areas")}, \
{"", TARGET_DEFAULT | TARGET_CPU_DEFAULT, ""} } {"", TARGET_DEFAULT | TARGET_CPU_DEFAULT \
| TARGET_DEFAULT_EXPLICIT_RELOCS, ""} }
#define TARGET_DEFAULT MASK_FP|MASK_FPREGS #define TARGET_DEFAULT MASK_FP|MASK_FPREGS
...@@ -259,6 +260,14 @@ extern enum alpha_fp_trap_mode alpha_fptm; ...@@ -259,6 +260,14 @@ extern enum alpha_fp_trap_mode alpha_fptm;
#define TARGET_CPU_DEFAULT 0 #define TARGET_CPU_DEFAULT 0
#endif #endif
#ifndef TARGET_DEFAULT_EXPLICIT_RELOCS
#ifdef HAVE_AS_EXPLICIT_RELOCS
#define TARGET_DEFAULT_EXPLICIT_RELOCS MASK_EXPLICIT_RELOCS
#else
#define TARGET_DEFAULT_EXPLICIT_RELOCS 0
#endif
#endif
/* This macro is similar to `TARGET_SWITCHES' but defines names of /* This macro is similar to `TARGET_SWITCHES' but defines names of
command options that have values. Its definition is an initializer command options that have values. Its definition is an initializer
with a subgrouping for each command option. with a subgrouping for each command option.
......
...@@ -1623,6 +1623,48 @@ fi ...@@ -1623,6 +1623,48 @@ fi
AC_MSG_RESULT($gcc_cv_as_shf_merge) AC_MSG_RESULT($gcc_cv_as_shf_merge)
case "$target" in case "$target" in
# All TARGET_ABI_OSF targets.
alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
AC_CACHE_CHECK([assembler supports explicit relocations],
gcc_cv_as_explicit_relocs, [
gcc_cv_as_explicit_relocs=unknown
if test x$gcc_cv_gas_major_version != x \
-a x$gcc_cv_gas_minor_version != x
then
if test "$gcc_cv_gas_major_version" -eq 2 \
-a "$gcc_cv_gas_minor_version" -ge 12 \
-o "$gcc_cv_gas_major_version" -gt 2; then
gcc_cv_as_explicit_relocs=yes
fi
elif test x$gcc_cv_as != x; then
cat > conftest.s << 'EOF'
.set nomacro
.text
extbl $3, $2, $3 !lituse_bytoff!1
ldq $2, a($29) !literal!1
ldq $4, b($29) !literal!2
ldq_u $3, 0($2) !lituse_base!1
ldq $27, f($29) !literal!5
jsr $26, ($27), f !lituse_jsr!5
ldah $29, 0($26) !gpdisp!3
lda $0, c($29) !gprel
ldah $1, d($29) !gprelhigh
lda $1, d($1) !gprellow
lda $29, 0($29) !gpdisp!3
EOF
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
gcc_cv_as_explicit_relocs=yes
else
gcc_cv_as_explicit_relocs=no
fi
rm -f conftest.s conftest.o
fi
])
if test "x$gcc_cv_as_explicit_relocs" = xyes; then
AC_DEFINE(HAVE_AS_EXPLICIT_RELOCS, 1,
[Define if your assembler supports explicit relocations.])
fi
;;
sparc*-*-*) sparc*-*-*)
AC_CACHE_CHECK([assembler .register pseudo-op support], AC_CACHE_CHECK([assembler .register pseudo-op support],
gcc_cv_as_register_pseudo_op, [ gcc_cv_as_register_pseudo_op, [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment