aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/xtensa
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/xtensa')
-rw-r--r--gcc/config/xtensa/xtensa-protos.h1
-rw-r--r--gcc/config/xtensa/xtensa.c22
-rw-r--r--gcc/config/xtensa/xtensa.h16
3 files changed, 18 insertions, 21 deletions
diff --git a/gcc/config/xtensa/xtensa-protos.h b/gcc/config/xtensa/xtensa-protos.h
index b248da9..74620e0 100644
--- a/gcc/config/xtensa/xtensa-protos.h
+++ b/gcc/config/xtensa/xtensa-protos.h
@@ -86,7 +86,6 @@ extern void print_operand PARAMS ((FILE *, rtx, int));
extern void print_operand_address PARAMS ((FILE *, rtx));
extern void xtensa_output_literal
PARAMS ((FILE *, rtx, enum machine_mode, int labelno));
-extern void xtensa_reorg PARAMS ((rtx));
extern rtx xtensa_return_addr PARAMS ((int, rtx));
extern rtx xtensa_builtin_saveregs PARAMS ((void));
extern enum reg_class xtensa_preferred_reload_class
diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c
index f053fd0..cc5db91 100644
--- a/gcc/config/xtensa/xtensa.c
+++ b/gcc/config/xtensa/xtensa.c
@@ -198,6 +198,7 @@ static rtx gen_conditional_move PARAMS ((rtx));
static rtx fixup_subreg_mem PARAMS ((rtx x));
static enum machine_mode xtensa_find_mode_for_size PARAMS ((unsigned));
static struct machine_function * xtensa_init_machine_status PARAMS ((void));
+static void xtensa_reorg PARAMS ((void));
static void printx PARAMS ((FILE *, signed int));
static unsigned int xtensa_multibss_section_type_flags
PARAMS ((tree, const char *, int));
@@ -243,6 +244,9 @@ static const int reg_nonleaf_alloc_order[FIRST_PSEUDO_REGISTER] =
#undef TARGET_ADDRESS_COST
#define TARGET_ADDRESS_COST hook_int_rtx_0
+#undef TARGET_MACHINE_DEPENDENT_REORG
+#define TARGET_MACHINE_DEPENDENT_REORG xtensa_reorg
+
struct gcc_target targetm = TARGET_INITIALIZER;
@@ -2187,13 +2191,23 @@ xtensa_frame_pointer_required ()
}
-void
-xtensa_reorg (first)
- rtx first;
+/* If the stack frame size is too big to fit in the immediate field of
+ the ENTRY instruction, we need to store the frame size in the
+ constant pool. However, the code in xtensa_function_prologue runs too
+ late to be able to add anything to the constant pool. Since the
+ final frame size isn't known until reload is complete, this seems
+ like the best place to do it.
+
+ There may also be some fixup required if there is an incoming argument
+ in a7 and the function requires a frame pointer. */
+
+static void
+xtensa_reorg ()
{
- rtx insn, set_frame_ptr_insn = 0;
+ rtx first, insn, set_frame_ptr_insn = 0;
unsigned long tsize = compute_frame_size (get_frame_size ());
+ first = get_insns ();
if (tsize < (1 << (12+3)))
frame_size_const = 0;
else
diff --git a/gcc/config/xtensa/xtensa.h b/gcc/config/xtensa/xtensa.h
index 84f131d..16fd3d6 100644
--- a/gcc/config/xtensa/xtensa.h
+++ b/gcc/config/xtensa/xtensa.h
@@ -1417,22 +1417,6 @@ typedef struct xtensa_args {
#define JUMP_TABLES_IN_TEXT_SECTION (flag_pic)
-/* Define this macro for the rare case where the RTL needs some sort of
- machine-dependent fixup immediately before register allocation is done.
-
- If the stack frame size is too big to fit in the immediate field of
- the ENTRY instruction, we need to store the frame size in the
- constant pool. However, the code in xtensa_function_prologue runs too
- late to be able to add anything to the constant pool. Since the
- final frame size isn't known until reload is complete, this seems
- like the best place to do it.
-
- There may also be some fixup required if there is an incoming argument
- in a7 and the function requires a frame pointer. */
-
-#define MACHINE_DEPENDENT_REORG(INSN) xtensa_reorg (INSN)
-
-
/* Define the strings to put out for each section in the object file. */
#define TEXT_SECTION_ASM_OP "\t.text"
#define DATA_SECTION_ASM_OP "\t.data"