aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/nextstep.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@gcc.gnu.org>2002-05-18 16:47:22 -0700
committerRichard Henderson <rth@gcc.gnu.org>2002-05-18 16:47:22 -0700
commitb64a1b533c33a7fe86b6fde2dc99009032f9f810 (patch)
tree368c086772f8bba5b6b885540729ed85f99dd14e /gcc/config/nextstep.c
parentd63e8c485766fb644be59deed6a5dc9172b9d461 (diff)
downloadgcc-b64a1b533c33a7fe86b6fde2dc99009032f9f810.zip
gcc-b64a1b533c33a7fe86b6fde2dc99009032f9f810.tar.gz
gcc-b64a1b533c33a7fe86b6fde2dc99009032f9f810.tar.bz2
system.h (SELECT_RTX_SECTION): Poison.
* system.h (SELECT_RTX_SECTION): Poison. * target-def.h (TARGET_ASM_SELECT_RTX_SECTION): New. * target.h (select_rtx_section): New. * varasm.c (output_constant_pool): Use it. (default_select_rtx_section, default_elf_select_rtx_section): New. * output.h: Declare them. * config/darwin.h (SELECT_RTX_SECTION): Move ... * config/darwin.c (machopic_select_rtx_section): ... here. * config/darwin-protos.h: Update. * config/nextstep.h (SELECT_RTX_SECTION): Move ... * config/nextstep.c (machopic_select_rtx_section): ... here. (nextstep_select_section): Rename variable to avoid macro clash. * config/nextstep-protos.h: Update. * config/elfos.h, config/svr3.h, config/arm/aof.h, config/c4x/c4x.h, config/i386/dgux.h, config/i386/osfrose.h, config/i386/sco5.h, config/i386/svr3gas.h, config/i860/paragon.h, config/ia64/aix.h, config/m32r/m32r.h, config/m68k/dpx2.h, config/m68k/lynx.h, config/m68k/m68k.h, config/m68k/tower-as.h, config/m88k/dgux.h, config/mcore/mcore-pe.h, config/mips/mips.h, config/mmix/mmix.h, config/pa/pa-linux.h, config/pa/pa.h, config/romp/romp.h, config/rs6000/lynx.h, config/rs6000/sysv4.h, config/s390/linux.h, config/sparc/sysv4.h, config/xtensa/elf.h, config/xtensa/linux.h (SELECT_RTX_SECTION): Remove. * config/darwin.h, config/elfos.h, config/nextstep.h, config/ia64/aix.h, config/ia64/sysv4.h, config/alpha/alpha.c, config/mips/mips.c, config/romp/romp.c, config/rs6000/sysv4.h, config/rs6000/xcoff.h, config/s390/s390.c, config/sparc/aout.h, config/sparc/lynx.h, config/xtensa/xtensa.c (TARGET_ASM_SELECT_RTX_SECTION): New. * config/alpha/elf.h (SELECT_RTX_SECTION): Move ... * config/alpha/alpha.c (alpha_elf_select_rtx_section): ... here. * config/ia64/sysv4.h (SELECT_RTX_SECTION): Move ... * config/ia64/ia64.c (ia64_select_rtx_section): ... here. (ia64_aix_select_rtx_section): New. * config/mips/iris6.h (READONLY_DATA_SECTION_ASM_OP): Undef before redefining. * config/mips/mips.c (mips_select_rtx_section): Make static. Support ELF SHF_MERGE features. * config/mips/mips-protos.h: Update. * config/rs6000/xcoff.h (SELECT_RTX_SECTION): Move ... * config/rs6000/rs6000.c (rs6000_xcoff_select_rtx_section): ... here. (rs6000_elf_select_rtx_section): Rename from rs6000_select_rtx_section; make static, fall back to default_elf_select_rtx_section. * config/rs6000/rs6000-protos.h: Update. * config/sparc/sparc.h (SELECT_RTX_SECTION): Move ... * config/sparc/sparc.c (sparc_aout_select_rtx_section): ... here. * config/sparc/sunos4.h (on_exit): Declare only if IN_LIBGCC2. * config/romp/romp.c (romp_select_rtx_section): New. * config/s390/s390.c (s390_select_rtx_section): New. * config/xtensa/xtensa.c: Include output.h. Shuffle local function declarations before target macro definition. (xtensa_emit_call): Use static buffer. (xtensa_select_rtx_section): New. * config/xtensa/xtensa.h (MAX_INT_TYPE_SIZE): Remove. (IMPLICIT_FIX_EXPR, EASY_DIV_EXPR): Remove. (ASM_OUTPUT_POOL_PROLOGUE): Update call to resolve_unique_section. * doc/tm.texi (TARGET_ASM_SELECT_RTX_SECTION): Update from SELECT_RTX_SECTION docs. From-SVN: r53600
Diffstat (limited to 'gcc/config/nextstep.c')
-rw-r--r--gcc/config/nextstep.c26
1 files changed, 21 insertions, 5 deletions
diff --git a/gcc/config/nextstep.c b/gcc/config/nextstep.c
index a701776..e7ae8f6 100644
--- a/gcc/config/nextstep.c
+++ b/gcc/config/nextstep.c
@@ -135,16 +135,16 @@ nextstep_select_section (exp, reloc, align)
|| TREE_CODE (exp) == REAL_CST)
{
tree size = TYPE_SIZE (TREE_TYPE (exp));
- HOST_WIDE_INT size_int;
+ HOST_WIDE_INT size_i;
if (TREE_CODE (size) == INTEGER_CST)
- size_int = tree_low_cst (size, 1);
+ size_i = tree_low_cst (size, 1);
else
- size_int = 0;
+ size_i = 0;
- if (size_int == 4)
+ if (size_i == 4)
literal4_section ();
- else if (size_int == 8)
+ else if (size_i == 8)
literal8_section ();
else
readonly_data_section ();
@@ -235,3 +235,19 @@ nextstep_select_section (exp, reloc, align)
else
readonly_data_section ();
}
+
+void
+nextstep_select_rtx_section (mode, x, align)
+ enum machine_mode mode;
+ rtx x;
+ unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED;
+{
+ if (GET_MODE_SIZE (mode) == 8)
+ literal8_section ();
+ else if (GET_MODE_SIZE (mode) == 4
+ && (GET_CODE (x) == CONST_INT
+ || GET_CODE (x) == CONST_DOUBLE))
+ literal4_section ();
+ else
+ const_section ();
+}