diff options
author | Joseph Myers <joseph@codesourcery.com> | 2007-07-03 21:28:02 +0100 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2007-07-03 21:28:02 +0100 |
commit | a44380d2e9ddc136b44602776d8b08f8860f0ee5 (patch) | |
tree | fc1045ddc2ae28ae1e8c91ac9354691f08450ec9 /gcc | |
parent | f1adb0a9f4d73554d243604b5ffe173843d3d705 (diff) | |
download | gcc-a44380d2e9ddc136b44602776d8b08f8860f0ee5.zip gcc-a44380d2e9ddc136b44602776d8b08f8860f0ee5.tar.gz gcc-a44380d2e9ddc136b44602776d8b08f8860f0ee5.tar.bz2 |
configure.ac: Test for .dtprelword support on MIPS.
* configure.ac: Test for .dtprelword support on MIPS.
* configure, config.in: Regenerate.
* config/mips/mips.c (mips_output_dwarf_dtprel): New.
(TARGET_ASM_OUTPUT_DWARF_DTPREL): Define.
From-SVN: r126273
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config.in | 6 | ||||
-rw-r--r-- | gcc/config/mips/mips.c | 28 | ||||
-rwxr-xr-x | gcc/configure | 41 | ||||
-rw-r--r-- | gcc/configure.ac | 10 |
5 files changed, 92 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4bf74fe..a822caa 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2007-07-03 Joseph Myers <joseph@codesourcery.com> + + * configure.ac: Test for .dtprelword support on MIPS. + * configure, config.in: Regenerate. + * config/mips/mips.c (mips_output_dwarf_dtprel): New. + (TARGET_ASM_OUTPUT_DWARF_DTPREL): Define. + 2007-07-03 Julian Brown <julian@codesourcery.com> * config.gcc (with_fpu): Allow --with-fpu=vfp3. diff --git a/gcc/config.in b/gcc/config.in index e5faa7a..30b1c42 100644 --- a/gcc/config.in +++ b/gcc/config.in @@ -185,6 +185,12 @@ #endif +/* Define if your assembler supports .dtprelword. */ +#ifndef USED_FOR_TARGET +#undef HAVE_AS_DTPRELWORD +#endif + + /* Define if your assembler supports dwarf2 .file/.loc directives, and preserves file table indices exactly as given. */ #ifndef USED_FOR_TARGET diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index 0cb1d1a..da93ddc 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -428,6 +428,7 @@ static void mips_extra_live_on_entry (bitmap); static int mips_comp_type_attributes (tree, tree); static int mips_mode_rep_extended (enum machine_mode, enum machine_mode); static bool mips_offset_within_alignment_p (rtx, HOST_WIDE_INT); +static void mips_output_dwarf_dtprel (FILE *, int, rtx) ATTRIBUTE_UNUSED; /* Structure to be filled in by compute_frame_size with register save masks, and offsets for the current function. */ @@ -1326,6 +1327,11 @@ static const unsigned char mips16e_save_restore_regs[] = { #undef TARGET_COMP_TYPE_ATTRIBUTES #define TARGET_COMP_TYPE_ATTRIBUTES mips_comp_type_attributes +#ifdef HAVE_AS_DTPRELWORD +#undef TARGET_ASM_OUTPUT_DWARF_DTPREL +#define TARGET_ASM_OUTPUT_DWARF_DTPREL mips_output_dwarf_dtprel +#endif + struct gcc_target targetm = TARGET_INITIALIZER; @@ -11819,4 +11825,26 @@ mips_mode_rep_extended (enum machine_mode mode, enum machine_mode mode_rep) return UNKNOWN; } +/* MIPS implementation of TARGET_ASM_OUTPUT_DWARF_DTPREL. */ + +static void +mips_output_dwarf_dtprel (FILE *file, int size, rtx x) +{ + switch (size) + { + case 4: + fputs ("\t.dtprelword\t", file); + break; + + case 8: + fputs ("\t.dtpreldword\t", file); + break; + + default: + gcc_unreachable (); + } + output_addr_const (file, x); + fputs ("+0x8000", file); +} + #include "gt-mips.h" diff --git a/gcc/configure b/gcc/configure index 2981115..d317039 100755 --- a/gcc/configure +++ b/gcc/configure @@ -15907,6 +15907,47 @@ cat >>confdefs.h <<\_ACEOF _ACEOF fi + + echo "$as_me:$LINENO: checking assembler for .dtprelword support" >&5 +echo $ECHO_N "checking assembler for .dtprelword support... $ECHO_C" >&6 +if test "${gcc_cv_as_mips_dtprelword+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + gcc_cv_as_mips_dtprelword=no + if test $in_tree_gas = yes; then + if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0` + then gcc_cv_as_mips_dtprelword=yes +fi + elif test x$gcc_cv_as != x; then + echo '.section .tdata,"awT",@progbits +x: + .word 2 + .text + .dtprelword x+0x8000' > 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_mips_dtprelword=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_mips_dtprelword" >&5 +echo "${ECHO_T}$gcc_cv_as_mips_dtprelword" >&6 +if test $gcc_cv_as_mips_dtprelword = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_AS_DTPRELWORD 1 +_ACEOF + +fi ;; esac diff --git a/gcc/configure.ac b/gcc/configure.ac index 2ec7c31..5a65f89 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -2953,6 +2953,16 @@ LCF0: [.gnu_attribute 4,1],, [AC_DEFINE(HAVE_AS_GNU_ATTRIBUTE, 1, [Define if your assembler supports .gnu_attribute.])]) + + gcc_GAS_CHECK_FEATURE([.dtprelword support], + gcc_cv_as_mips_dtprelword, [2,18,0],, + [.section .tdata,"awT",@progbits +x: + .word 2 + .text + .dtprelword x+0x8000],, + [AC_DEFINE(HAVE_AS_DTPRELWORD, 1, + [Define if your assembler supports .dtprelword.])]) ;; esac |