From 4f396f9b2e2b0ba81521c844bc39a869f0a8e912 Mon Sep 17 00:00:00 2001 From: rsandifo Date: Wed, 13 Apr 2005 20:46:28 +0000 Subject: [PATCH] * config/mips/mips.h (ASM_OUTPUT_CASE_LABEL): Delete. (JUMP_TABLES_IN_TEXT_SECTION): Define. * config/mips/mips.c (mips16_insn_length): Remove reference to JUMP_TABLES_IN_TEXT_SECTION. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@98111 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 7 +++++++ gcc/config/mips/mips.c | 6 +----- gcc/config/mips/mips.h | 15 +++------------ 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 507bef1..0ce7275 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2005-04-13 Richard Sandiford + + * config/mips/mips.h (ASM_OUTPUT_CASE_LABEL): Delete. + (JUMP_TABLES_IN_TEXT_SECTION): Define. + * config/mips/mips.c (mips16_insn_length): Remove reference to + JUMP_TABLES_IN_TEXT_SECTION. + 2005-04-13 Fariborz Jahanian * simplify-rtx.c (simplify_binary_operation_1): Return diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index 0a82ce1..9e1a308 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -7988,11 +7988,7 @@ dump_constants (struct mips16_constant *constants, rtx insn) emit_barrier_after (insn); } -/* Return the length of instruction INSN. - - ??? MIPS16 switch tables go in .text, but we don't define - JUMP_TABLES_IN_TEXT_SECTION, so get_attr_length will not - compute their lengths correctly. */ +/* Return the length of instruction INSN. */ static int mips16_insn_length (rtx insn) diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h index 2c6e066..e2118e5 100644 --- a/gcc/config/mips/mips.h +++ b/gcc/config/mips/mips.h @@ -2576,18 +2576,9 @@ do { \ LOCAL_LABEL_PREFIX, VALUE); \ } while (0) -/* When generating mips16 code we want to put the jump table in the .text - section. In all other cases, we want to put the jump table in the .rdata - section. Unfortunately, we can't use JUMP_TABLES_IN_TEXT_SECTION, because - it is not conditional. Instead, we use ASM_OUTPUT_CASE_LABEL to switch back - to the .text section if appropriate. */ -#undef ASM_OUTPUT_CASE_LABEL -#define ASM_OUTPUT_CASE_LABEL(FILE, PREFIX, NUM, INSN) \ -do { \ - if (TARGET_MIPS16) \ - function_section (current_function_decl); \ - (*targetm.asm_out.internal_label) (FILE, PREFIX, NUM); \ -} while (0) +/* When generating MIPS16 code, we want the jump table to be in the text + section so that we can load its address using a PC-relative addition. */ +#define JUMP_TABLES_IN_TEXT_SECTION TARGET_MIPS16 /* This is how to output an assembler line that says to advance the location counter -- 2.7.4