diff options
author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-05-14 07:29:54 +0000 |
---|---|---|
committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-05-14 07:29:54 +0000 |
commit | 2efea8c0b1762fe1cce2b5bd1f599f31d074d148 (patch) | |
tree | d2bbeaff6d2da3e0971a4f5d54c7cba68cd26692 /gcc/config/xtensa | |
parent | 87a1da8d641b8769b808ab2e806027e237261a23 (diff) | |
download | gcc-2efea8c0b1762fe1cce2b5bd1f599f31d074d148.tar.gz |
* target-def.h (TARGET_MACHINE_DEPENDENT_REORG): Define.
(TARGET_INITIALIZER): Include it.
* target.h (struct gcc_target): Add machine_dependent_reorg field.
* toplev.c (rest_of_compilation): Use targetm.machine_dependent_reorg.
* config/alpha/alpha-protos.h (alpha_reorg): Remove declaration.
* config/alpha/alpha.h (MACHINE_DEPENDENT_REORG): Remove.
* config/alpha/alpha.c (TARGET_MACHINE_DEPENDENT_REORG): Define.
(alpha_handle_trap_shadows): Remove "first insn" parameter.
(alpha_align_insns): Likewise.
(alpha_reorg): Likewise. Make static. Update calls to above
functions.
* config/arm/arm-protos.h (arm_reorg): Remove declaration.
* config/arm/arm.h (MACHINE_DEPENDENT_REORG): Remove.
* config/arm/arm.c (TARGET_MACHINE_DEPENDENT_REORG): Define.
(arm_reorg): Remove parameter. Make static.
* config/avr/avr-protos.h (machine_dependent_reorg): Remove.
* config/avr/avr.h (MACHINE_DEPENDENT_REORG): Remove.
* config/avr/avr.c (TARGET_MACHINE_DEPENDENT_REORG): Define.
(avr_reorg): Renamed from machine_dependent_reorg. Make static.
Remove parameter.
* config/c4x/c4x-protos.h (c4x_process_after_reload): Remove.
* config/c4x/c4x.h (MACHINE_DEPENDENT_REORG): Remove.
* config/c4x/c4x.c (TARGET_MACHINE_DEPENDENT_REORG): Define.
(c4x_reorg): Renamed from c4x_process_after_reload. Make static.
Remove parameter.
* config/d30v/d30v-protos.h (d30v_machine_dependent_reorg): Remove.
* config/d30v/d30v.h (MACHINE_DEPENDENT_REORG): Remove.
* config/d30v/d30v.c (d30v_machine_dependent_reorg): Remove.
* config/frv/frv-protos.h (frv_machine_dependent_reorg): Remove.
* config/frv/frv.c: Remove orphaned comment.
* config/i386/i386-protos.h (x86_machine_dependent_reorg): Remove.
* config/i386/i386.h (MACHINE_DEPENDENT_REORG): Remove.
* config/i386/i386.c (TARGET_MACHINE_DEPENDENT_REORG): Define.
(ix86_reorg): Renamed from x86_machine_dependent_reorg. Make static.
Remove parameter.
* config/ia64/ia64-protos.h (ia64_reorg): Remove declaration.
* config/ia64/ia64.h (MACHINE_DEPENDENT_REORG): Remove.
* config/ia64/ia64.c (TARGET_MACHINE_DEPENDENT_REORG): Define.
(emit_insn_group_barriers): Remove "first insn" parameter.
(emit_all_insn_group_barriers): Likewise.
(ia64_reorg): Likewise. Make static. Update calls to above functions.
(ia64_output_mi_thunk): Update call to emit_all_insn_group_barriers.
* config/ip2k/ip2k-protos.h (machine_dependent_reorg): Remove.
* config/ip2k/ip2k.h (MACHINE_DEPENDENT_REORG): Remove.
* config/ip2k/ip2k.c (TARGET_MACHINE_DEPENDENT_REORG): Define.
(ip2k_reorg): Renamed from machine_dependent_reorg. Make static.
Remove parameter.
* config/m68hc11/m68hc11-protos.h (m68hc11_reorg): Remove declaration.
* config/m68hc11/m68hc11.h (MACHINE_DEPENDENT_REORG): Remove.
* config/m68hc11/m68hc11.c (TARGET_MACHINE_DEPENDENT_REORG): Define.
(m68hc11_reorg): Make static. Remove parameter.
* config/mcore/mcore-protos.h (mcore_dependent_reorg): Remove.
* config/mcore/mcore.h (MACHINE_DEPENDENT_REORG): Remove.
* config/mcore/mcore.c (TARGET_MACHINE_DEPENDENT_REORG): Define.
(conditionalize_optimization): Remove parameter.
(mcore_reorg): Renamed from mcore_dependent_reorg. Remove parameter.
Make static. Update call to conditionalize_optimization.
* config/mips/mips-protos.h (machine_dependent_reorg): Remove.
* config/mips/mips.h (MACHINE_DEPENDENT_REORG): Remove.
* config/mips/mips.c (TARGET_MACHINE_DEPENDENT_REORG): Define.
(mips_reorg): Renamed from machine_dependent_reorg. Remove parameter.
Make static.
* config/mmix/mmix-protos.h (mmix_machine_dependent_reorg): Remove.
* config/mmix/mmix.h (MACHINE_DEPENDENT_REORG): Remove.
* config/mmix/mmix.c (TARGET_MACHINE_DEPENDENT_REORG): Define.
(mmix_reorg): Renamed from mmix_machine_dependent_reorg. Make static.
Remove parameter.
* config/pa/pa-protos.h (pa_reorg): Remove declaration.
* config/pa/pa.h (MACHINE_DEPENDENT_REORG): Remove.
* config/pa/pa.c (TARGET_MACHINE_DEPENDENT_REORG): Define.
(pa_combine_instructions): Remove "first insn" parameter.
(remove_useless_addtr_insns): Likewise.
(pa_reorg): Likewise. Make static. Update calls to above functions.
* config/rs6000/rs6000.h (MACHINE_DEPENDENT_REORG): Remove
commented-out definition.
* config/s390/s390-protos.h (s390_machine_dependent_reorg): Remove.
* config/s390/s390.h (MACHINE_DEPENDENT_REORG): Remove.
* config/s390/s390.c (TARGET_MACHINE_DEPENDENT_REORG): Define.
(s390_reorg): Renamed from s390_machine_dependent_reorg. Make static.
Remove parameter.
* config/sh/sh-protos.h (machine_dependent_reorg): Remove.
* config/sh/sh.h (MACHINE_DEPENDENT_REORG): Remove.
* config/sh/sh.c (TARGET_MACHINE_DEPENDENT_REORG): Define.
(sh_reorg): Renamed from machine_dependent_reorg. Make static.
Remove parameter.
(sh_output_mi_thunk): Call sh_reorg directly.
* config/sh/sh.md: Update comment.
* config/stormy16/stormy16.h (MACHINE_DEPENDENT_REORG): Remove
commented-out definition.
* config/v850/v850-protos.h (v850_reorg): Remove declaration.
* config/v850/v850.h (MACHINE_DEPENDENT_REORG): Remove.
* config/v850/v850.c (TARGET_MACHINE_DEPENDENT_REORG): Define.
(v850_reorg): Make static. Remove parameter.
* config/xtensa/xtensa-protos.h (xtensa_reorg): Remove declaration.
* config/xtensa/xtensa.h (MACHINE_DEPENDENT_REORG): Remove.
* config/xtensa/xtensa.c (TARGET_MACHINE_DEPENDENT_REORG): Define.
(xtensa_reorg): Make static. Remove parameter.
* doc/tm.texi (MACHINE_DEPENDENT_REORG): Remove.
(TARGET_MACHINE_DEPENDENT_REORG): Document.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66800 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/xtensa')
-rw-r--r-- | gcc/config/xtensa/xtensa-protos.h | 1 | ||||
-rw-r--r-- | gcc/config/xtensa/xtensa.c | 22 | ||||
-rw-r--r-- | gcc/config/xtensa/xtensa.h | 16 |
3 files changed, 18 insertions, 21 deletions
diff --git a/gcc/config/xtensa/xtensa-protos.h b/gcc/config/xtensa/xtensa-protos.h index b248da9d544..74620e037ea 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 f053fd0d871..cc5db918ecc 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 84f131dd2df..16fd3d69dd0 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" |