diff options
author | kan <kan@FreeBSD.org> | 2006-08-26 21:29:10 +0000 |
---|---|---|
committer | kan <kan@FreeBSD.org> | 2006-08-26 21:29:10 +0000 |
commit | 5c84bed2e8cff6c766e11d6ea545e97164e691c5 (patch) | |
tree | 7078a2224aa03a9d5caa5d11a9c917980f60fd6a /contrib/gcc/config/sparc | |
parent | 768d4ea5cbe248d3d90adabc5fd80c7c1fa74bcb (diff) | |
parent | ab6c6e434e4ca0bf593007d49dee6eceb73286c0 (diff) | |
download | FreeBSD-src-5c84bed2e8cff6c766e11d6ea545e97164e691c5.zip FreeBSD-src-5c84bed2e8cff6c766e11d6ea545e97164e691c5.tar.gz |
This commit was generated by cvs2svn to compensate for changes in r161651,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib/gcc/config/sparc')
-rw-r--r-- | contrib/gcc/config/sparc/gmon-sol2.c | 3 | ||||
-rw-r--r-- | contrib/gcc/config/sparc/sol2-gas-bi.h | 6 | ||||
-rw-r--r-- | contrib/gcc/config/sparc/sol2.h | 8 | ||||
-rw-r--r-- | contrib/gcc/config/sparc/sparc.c | 30 | ||||
-rw-r--r-- | contrib/gcc/config/sparc/sparc.h | 2 |
5 files changed, 34 insertions, 15 deletions
diff --git a/contrib/gcc/config/sparc/gmon-sol2.c b/contrib/gcc/config/sparc/gmon-sol2.c index 9f9f019..aeead89 100644 --- a/contrib/gcc/config/sparc/gmon-sol2.c +++ b/contrib/gcc/config/sparc/gmon-sol2.c @@ -267,8 +267,7 @@ _mcleanup(void) * -- [eichin:19920702.1107EST] */ -static void internal_mcount (char *, unsigned short *) - __attribute__ ((__unused__)); +static void internal_mcount (char *, unsigned short *) __attribute__ ((used)); /* i7 == last ret, -> frompcindex */ /* o7 == current ret, -> selfpc */ diff --git a/contrib/gcc/config/sparc/sol2-gas-bi.h b/contrib/gcc/config/sparc/sol2-gas-bi.h index 88b3954..bea2b3c 100644 --- a/contrib/gcc/config/sparc/sol2-gas-bi.h +++ b/contrib/gcc/config/sparc/sol2-gas-bi.h @@ -3,3 +3,9 @@ #undef AS_SPARC64_FLAG #define AS_SPARC64_FLAG "-TSO -64 -Av9" + +/* Emit a DTP-relative reference to a TLS variable. */ +#ifdef HAVE_AS_TLS +#define ASM_OUTPUT_DWARF_DTPREL(FILE, SIZE, X) \ + sparc_output_dwarf_dtprel (FILE, SIZE, X) +#endif diff --git a/contrib/gcc/config/sparc/sol2.h b/contrib/gcc/config/sparc/sol2.h index cbf914e..e5ed818 100644 --- a/contrib/gcc/config/sparc/sol2.h +++ b/contrib/gcc/config/sparc/sol2.h @@ -84,7 +84,7 @@ Boston, MA 02111-1307, USA. */ #undef ASM_GENERATE_INTERNAL_LABEL #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \ - sprintf ((LABEL), "*.L%s%ld", (PREFIX), (long)(NUM)) + sprintf ((LABEL), "*.L%s%lu", (PREFIX), (unsigned long)(NUM)) /* The native TLS-enabled assembler requires the directive #tls_object to be put on objects in TLS sections (as of v7.1). This is not @@ -113,6 +113,12 @@ Boston, MA 02111-1307, USA. */ } \ while (0) +/* The Solaris assembler cannot grok r_tls_dtpoff. This is + a kludge as ASM_OUTPUT_DWARF_DTPREL is defined in sparc.h, + undefined here and defined again in sol2-gas-bi.h. */ +#ifdef HAVE_AS_TLS +#undef ASM_OUTPUT_DWARF_DTPREL +#endif #undef ENDFILE_SPEC diff --git a/contrib/gcc/config/sparc/sparc.c b/contrib/gcc/config/sparc/sparc.c index 0b07e46..86524cc 100644 --- a/contrib/gcc/config/sparc/sparc.c +++ b/contrib/gcc/config/sparc/sparc.c @@ -2946,26 +2946,34 @@ eligible_for_epilogue_delay (rtx trial, int slot) int tls_call_delay (rtx trial) { - rtx pat, unspec; + rtx pat; /* Binutils allows - call __tls_get_addr, %tgd_call (foo) - add %l7, %o0, %o0, %tgd_add (foo) + call __tls_get_addr, %tgd_call (foo) + add %l7, %o0, %o0, %tgd_add (foo) while Sun as/ld does not. */ if (TARGET_GNU_TLS || !TARGET_TLS) return 1; pat = PATTERN (trial); - if (GET_CODE (pat) != SET || GET_CODE (SET_DEST (pat)) != PLUS) - return 1; - unspec = XEXP (SET_DEST (pat), 1); - if (GET_CODE (unspec) != UNSPEC - || (XINT (unspec, 1) != UNSPEC_TLSGD - && XINT (unspec, 1) != UNSPEC_TLSLDM)) - return 1; + /* We must reject tgd_add{32|64}, i.e. + (set (reg) (plus (reg) (unspec [(reg) (symbol_ref)] UNSPEC_TLSGD))) + and tldm_add{32|64}, i.e. + (set (reg) (plus (reg) (unspec [(reg) (symbol_ref)] UNSPEC_TLSLDM))) + for Sun as/ld. */ + if (GET_CODE (pat) == SET + && GET_CODE (SET_SRC (pat)) == PLUS) + { + rtx unspec = XEXP (SET_SRC (pat), 1); - return 0; + if (GET_CODE (unspec) == UNSPEC + && (XINT (unspec, 1) == UNSPEC_TLSGD + || XINT (unspec, 1) == UNSPEC_TLSLDM)) + return 0; + } + + return 1; } /* Return nonzero if TRIAL can go into the sibling call diff --git a/contrib/gcc/config/sparc/sparc.h b/contrib/gcc/config/sparc/sparc.h index 3202359..9f72bc8 100644 --- a/contrib/gcc/config/sparc/sparc.h +++ b/contrib/gcc/config/sparc/sparc.h @@ -1892,7 +1892,7 @@ extern GTY(()) rtx sparc_compare_op1; case of a global register variable occupying more than one register we prefix the second and following registers with .gnu.part1. etc. */ -extern char sparc_hard_reg_printed[8]; +extern GTY(()) char sparc_hard_reg_printed[8]; #ifdef HAVE_AS_REGISTER_PSEUDO_OP #define ASM_DECLARE_REGISTER_GLOBAL(FILE, DECL, REGNO, NAME) \ |