diff options
Diffstat (limited to 'gcc/config/sparc')
-rw-r--r-- | gcc/config/sparc/aout.h | 1 | ||||
-rw-r--r-- | gcc/config/sparc/lynx.h | 1 | ||||
-rw-r--r-- | gcc/config/sparc/sparc.c | 20 | ||||
-rw-r--r-- | gcc/config/sparc/sparc.h | 13 | ||||
-rw-r--r-- | gcc/config/sparc/sunos4.h | 2 | ||||
-rw-r--r-- | gcc/config/sparc/sysv4.h | 10 |
6 files changed, 23 insertions, 24 deletions
diff --git a/gcc/config/sparc/aout.h b/gcc/config/sparc/aout.h index 292f164cd1f..7532281361d 100644 --- a/gcc/config/sparc/aout.h +++ b/gcc/config/sparc/aout.h @@ -38,6 +38,7 @@ Boston, MA 02111-1307, USA. */ || !strcmp (STR, "target") || !strcmp (STR, "assert")) #define TARGET_ASM_SELECT_SECTION sparc_aout_select_section +#define TARGET_ASM_SELECT_RTX_SECTION sparc_aout_select_rtx_section /* Output the label for a function definition. */ diff --git a/gcc/config/sparc/lynx.h b/gcc/config/sparc/lynx.h index 866612d3b8a..db72a923476 100644 --- a/gcc/config/sparc/lynx.h +++ b/gcc/config/sparc/lynx.h @@ -19,7 +19,6 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #undef ASM_OUTPUT_IDENT -#undef SELECT_RTX_SECTION #define BSS_SECTION_ASM_OP "\t.section\t\".bss\"" diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index 8b7c14692ce..3444ffc0598 100644 --- a/gcc/config/sparc/sparc.c +++ b/gcc/config/sparc/sparc.c @@ -160,6 +160,9 @@ static void sparc_elf_asm_named_section PARAMS ((const char *, unsigned int)); static void sparc_aout_select_section PARAMS ((tree, int, unsigned HOST_WIDE_INT)) ATTRIBUTE_UNUSED; +static void sparc_aout_select_rtx_section PARAMS ((enum machine_mode, rtx, + unsigned HOST_WIDE_INT)) + ATTRIBUTE_UNUSED; static int sparc_adjust_cost PARAMS ((rtx, rtx, rtx, int)); static int sparc_issue_rate PARAMS ((void)); @@ -8056,6 +8059,23 @@ sparc_aout_select_section (t, reloc, align) default_select_section (t, reloc | SUNOS4_SHARED_LIBRARIES, align); } +/* Use text section for a constant unless we need more alignment than + that offers. */ + +static void +sparc_aout_select_rtx_section (mode, x, align) + enum machine_mode mode; + rtx x; + unsigned HOST_WIDE_INT align; +{ + if (align <= MAX_TEXT_ALIGN + && ! (flag_pic && (symbolic_operand (x, mode) + || SUNOS4_SHARED_LIBRARIES))) + readonly_data_section (); + else + data_section (); +} + int sparc_extra_constraint_check (op, c, strict) rtx op; diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h index 8429a7f554b..ad19d6ba082 100644 --- a/gcc/config/sparc/sparc.h +++ b/gcc/config/sparc/sparc.h @@ -826,19 +826,6 @@ if (TARGET_ARCH64 \ #ifndef SUNOS4_SHARED_LIBRARIES #define SUNOS4_SHARED_LIBRARIES 0 #endif - - -/* Use text section for a constant - unless we need more alignment than that offers. */ -/* This is defined differently for v9 in a cover file. */ -#define SELECT_RTX_SECTION(MODE, X, ALIGN) \ -{ \ - if (GET_MODE_BITSIZE (MODE) <= MAX_TEXT_ALIGN \ - && ! (flag_pic && (symbolic_operand ((X), (MODE)) || SUNOS4_SHARED_LIBRARIES))) \ - text_section (); \ - else \ - data_section (); \ -} /* Standard register usage. */ diff --git a/gcc/config/sparc/sunos4.h b/gcc/config/sparc/sunos4.h index e5b2dcce4a6..513251ce836 100644 --- a/gcc/config/sparc/sunos4.h +++ b/gcc/config/sparc/sunos4.h @@ -41,6 +41,8 @@ Boston, MA 02111-1307, USA. */ /* SunOS has on_exit instead of atexit. */ /* The man page says it returns int. */ +#ifdef IN_LIBGCC2 extern int on_exit PARAMS ((void *, void *)); +#endif #define ON_EXIT(FUNC) on_exit ((FUNC), 0) #define NEED_ATEXIT diff --git a/gcc/config/sparc/sysv4.h b/gcc/config/sparc/sysv4.h index a5242bd8dd1..666ee621589 100644 --- a/gcc/config/sparc/sysv4.h +++ b/gcc/config/sparc/sysv4.h @@ -68,16 +68,6 @@ Boston, MA 02111-1307, USA. */ "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*} \ %{fpic:-K PIC} %{fPIC:-K PIC} %(asm_cpu)" -/* Must use data section for relocatable constants when pic. */ -#undef SELECT_RTX_SECTION -#define SELECT_RTX_SECTION(MODE,RTX,ALIGN) \ -{ \ - if (flag_pic && symbolic_operand ((RTX), (MODE))) \ - data_section (); \ - else \ - readonly_data_section (); \ -} - /* Define the names of various pseudo-op used by the Sparc/svr4 assembler. Note that many of these are different from the typical pseudo-ops used by most svr4 assemblers. That is probably due to a (misguided?) attempt |