From 1cb36a981d95f29f37fef511b88a04c48cfa90cc Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Mon, 2 Aug 1999 15:58:04 -0700 Subject: Jakub Jelinek * config/sparc/sparc.h (ASM_DECLARE_REGISTER_GLOBAL): New macro. (RTX_OK_FOR_OLO10): Likewise. (GO_IF_LEGITIMATE_ADDRESS): If assembler supports offsetable %lo(), allow it in addresses... (PRINT_OPERAND_ADDRESS): ... and print it appropriately. * config/sparc/sparc.md (sethi_di_medlow_embmedany_pic): sethi %lo() does not make sense. * config/sparc/sparc.c (sparc_hard_reg_printed): New array. (sparc_output_scratch_registers): New function. (output_function_prologue, sparc_flat_output_function_prologue): Use it. * varasm.c (make_decl_rtl): Use ASM_DECLARE_REGISTER_GLOBAL if defined. * tm.texi (ASM_DECLARE_REGISTER_GLOBAL): Document it. * configure.in: Add check for .register pseudo-op support in as and check for offsetable %lo(). * acconfig.h: Add templates for the above checks. * configure: Regenerate. Richard Henderson * sparc/linux64.h (TARGET_DEFAULT): Remove MASK_APP_REGS. * sparc/sol2-sld-64.h (TARGET_DEFAULT): Likewise. * sparc/sol2.h (TARGET_DEFAULT): Likewise. From-SVN: r28414 --- gcc/configure | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 60 insertions(+), 6 deletions(-) (limited to 'gcc/configure') diff --git a/gcc/configure b/gcc/configure index dea5c9a..634da9a 100755 --- a/gcc/configure +++ b/gcc/configure @@ -8325,10 +8325,62 @@ EOF fi echo "$ac_t""$gcc_cv_as_subsections" 1>&6 -echo $ac_n "checking assembler instructions""... $ac_c" 1>&6 -echo "configure:8330: checking assembler instructions" >&5 -gcc_cv_as_instructions= -if test x$gcc_cv_as != x; then +case "$target" in + sparc*-*-*) + echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6 +echo "configure:8332: checking assembler .register pseudo-op support" >&5 + gcc_cv_as_register_pseudo_op= + if test x$gcc_cv_as != x; then + # Check if we have .register + echo ".register %g2, #scratch" > conftest.s + if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then + gcc_cv_as_register_pseudo_op=yes + cat >> confdefs.h <<\EOF +#define HAVE_AS_REGISTER_PSEUDO_OP 1 +EOF + + fi + rm -f conftest.s conftest.o + fi + echo "$ac_t""$gcc_cv_as_register_pseudo_op" 1>&6 + + echo $ac_n "checking assembler offsetable %lo() support""... $ac_c" 1>&6 +echo "configure:8349: checking assembler offsetable %lo() support" >&5 + gcc_cv_as_offsetable_lo10= + if test x$gcc_cv_as != x; then + # Check if assembler has offsetable %lo() + echo "or %g1, %lo(ab) + 12, %g1" > conftest.s + echo "or %g1, %lo(ab + 12), %g1" > conftest1.s + gcc_cv_as_flags64="-xarch=v9" + if ! $gcc_cv_as $gcc_cv_as_flags64 -o conftest.o conftest.s > /dev/null 2>&1; then + gcc_cv_as_flags64="-64" + if ! $gcc_cv_as $gcc_cv_as_flags64 -o conftest.o conftest.s > /dev/null 2>&1; then + gcc_cv_as_flags64="" + fi + fi + if test -n "$gcc_cv_as_flags64" ; then + if $gcc_cv_as $gcc_cv_as_flags64 -o conftest1.o conftest1.s > /dev/null 2>&1; then + if cmp conftest.o conftest1.o > /dev/null 2>&1; then + : + else + gcc_cv_as_offsetable_lo10=yes + cat >> confdefs.h <<\EOF +#define HAVE_AS_OFFSETABLE_LO10 1 +EOF + + fi + fi + fi + rm -f conftest.s conftest.o conftest1.s conftest1.o + fi + echo "$ac_t""$gcc_cv_as_offsetable_lo10" 1>&6 + ;; + + i[34567]86-*-*) + echo $ac_n "checking assembler instructions""... $ac_c" 1>&6 +echo "configure:8382: checking assembler instructions" >&5 + gcc_cv_as_instructions= + if test x$gcc_cv_as != x; then set "filds fists" "filds mem; fists mem" while test $# -gt 0 do @@ -8343,8 +8395,10 @@ EOF shift 2 done rm -f conftest.s conftest.o -fi -echo "$ac_t""$gcc_cv_as_instructions" 1>&6 + fi + echo "$ac_t""$gcc_cv_as_instructions" 1>&6 + ;; +esac # Figure out what language subdirectories are present. # Look if the user specified --enable-languages="..."; if not, use -- cgit v1.1