diff options
author | Neil Booth <neil@gcc.gnu.org> | 2001-07-06 18:40:17 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2001-07-06 18:40:17 +0000 |
commit | 08c148a85ce39064798592a90839497c098fbc93 (patch) | |
tree | 0ff4b9170093f108e4988c09e21e8b9ff5dd462a /gcc/config/arm | |
parent | b62c888152fb7d3245bbea7464c50aef8fe1c8fa (diff) | |
download | gcc-08c148a85ce39064798592a90839497c098fbc93.zip gcc-08c148a85ce39064798592a90839497c098fbc93.tar.gz gcc-08c148a85ce39064798592a90839497c098fbc93.tar.bz2 |
Makefile.in (final.o): Depend on target.h.
* Makefile.in (final.o): Depend on target.h.
* final.c: Include target.h.
(default_function_pro_epilogue): New.
(final_start_function): Use target structure for function prologues.
(final_end_function): Use target structure for function epilogues.
* fold-const.c (real_hex_to_f): Constify s and p.
* output.h (default_function_pro_epilogue): New.
* real.h (real_hex_to_f): Update prototype.
* target-def.h (TARGET_ASM_FUNCTION_PROLOGUE,
TARGET_ASM_FUNCTION_EPILOGUE, TARGET_ASM_OUT): New.
(TARGET_INITIALIZER): Update.
* target.h (gcc_target): Add struct asm_out.
* doc/tm.texi: Update.
config:
Update each arch to use TARGET_ASM_FUNCTION_PROLOGUE and
TARGET_ASM_FUNCTION_EPILOGUE. Move macro code to functions
in cpu/cpu.c, or rename old functions consistently. Take
a HOST_WIDE INT not an int as the SIZE parameter. Remove now
redundant macros and prototypes. Make new functions static.
* 1750a/1750a.c: Similarly.
* 1750a/1750a.h: Similarly.
* a29k/a29k-protos.h: Similarly.
* a29k/a29k.c: Similarly.
* a29k/a29k.h: Similarly.
* arc/arc-protos.h: Similarly.
* arc/arc.c: Similarly.
* arc/arc.h: Similarly.
* arm/arm-protos.h: Similarly.
* arm/arm.c: Similarly.
* arm/arm.h: Similarly.
* avr/avr-protos.h: Similarly.
* avr/avr.c: Similarly.
* avr/avr.h: Similarly.
* clipper/clipper-protos.h: Similarly.
* clipper/clipper.c: Similarly.
* clipper/clipper.h: Similarly.
* convex/convex.c: Similarly.
* convex/convex.h: Similarly.
* d30v/d30v-protos.h: Similarly.
* d30v/d30v.c: Similarly.
* d30v/d30v.h: Similarly.
* d30v/d30v.md: Similarly.
* dsp16xx/dsp16xx-protos.h: Similarly.
* dsp16xx/dsp16xx.c: Similarly.
* dsp16xx/dsp16xx.h: Similarly.
* elxsi/elxsi.c: Similarly.
* elxsi/elxsi.h: Similarly.
* fr30/fr30.c: Similarly.
* fr30/fr30.md: Similarly.
* h8300/h8300-protos.h: Similarly.
* h8300/h8300.c: Similarly.
* h8300/h8300.h: Similarly.
* i370/i370-protos.h: Similarly.
* i370/i370.c: Similarly.
* i370/i370.h: Similarly.
* i386/i386.c: Similarly.
* i386/osf1elf.h: Similarly.
* i386/osfrose.h: Similarly.
* i860/i860-protos.h: Similarly.
* i860/i860.c: Similarly.
* i860/i860.h: Similarly.
* i960/i960-protos.h: Similarly.
* i960/i960.c: Similarly.
* i960/i960.h: Similarly.
* ia64/ia64-protos.h: Similarly.
* ia64/ia64.c: Similarly.
* ia64/ia64.h: Similarly.
* m32r/m32r-protos.h: Similarly.
* m32r/m32r.c: Similarly.
* m32r/m32r.h: Similarly.
* m68hc11/m68hc11-protos.h: Similarly.
* m68hc11/m68hc11.c: Similarly.
* m68hc11/m68hc11.h: Similarly.
* m68k/crds.h: Similarly.
* m68k/dpx2.h: Similarly.
* m68k/m68k-protos.h: Similarly.
* m68k/m68k.c: Similarly.
* m68k/m68k.h: Similarly.
* m68k/news.h: Similarly.
* m88k/m88k-protos.h: Similarly.
* m88k/m88k.c: Similarly.
* m88k/m88k.h: Similarly.
* mips/mips-protos.h: Similarly.
* mips/mips.c: Similarly.
* mips/mips.h: Similarly.
* ns32k/merlin.h: Similarly.
* ns32k/ns32k.c: Similarly.
* ns32k/ns32k.h: Similarly.
* ns32k/tek6000.h: Similarly.
* pa/pa-protos.h: Similarly.
* pa/pa.c: Similarly.
* pa/pa.h: Similarly.
* pdp11/2bsd.h: Similarly.
* pdp11/pdp11-protos.h: Similarly.
* pdp11/pdp11.c: Similarly.
* pdp11/pdp11.h: Similarly.
* romp/romp-protos.h: Similarly.
* romp/romp.c: Similarly.
* romp/romp.h: Similarly.
* rs6000/rs6000-protos.h: Similarly.
* rs6000/rs6000.c: Similarly.
* rs6000/rs6000.h: Similarly.
* rs6000/sysv4.h: Similarly.
* sh/sh-protos.h: Similarly.
* sh/sh.c: Similarly.
* sh/sh.h: Similarly.
* sparc/sparc-protos.h: Similarly.
* sparc/sparc.c: Similarly.
* sparc/sparc.h: Similarly.
* vax/vax.c: Similarly.
* vax/vax.h: Similarly.
* vax/vms.h: Similarly.
* we32k/we32k.c: Similarly.
* we32k/we32k.h: Similarly.
From-SVN: r43817
Diffstat (limited to 'gcc/config/arm')
-rw-r--r-- | gcc/config/arm/arm-protos.h | 3 | ||||
-rw-r--r-- | gcc/config/arm/arm.c | 36 | ||||
-rw-r--r-- | gcc/config/arm/arm.h | 15 |
3 files changed, 28 insertions, 26 deletions
diff --git a/gcc/config/arm/arm-protos.h b/gcc/config/arm/arm-protos.h index 653d788..7078058 100644 --- a/gcc/config/arm/arm-protos.h +++ b/gcc/config/arm/arm-protos.h @@ -29,7 +29,6 @@ extern int arm_regno_class PARAMS ((int)); extern void arm_finalize_pic PARAMS ((int)); extern int arm_volatile_func PARAMS ((void)); extern const char * arm_output_epilogue PARAMS ((int)); -extern void output_func_epilogue PARAMS ((int)); extern void arm_expand_prologue PARAMS ((void)); /* Used in arm.md, but defined in output.c. */ extern void assemble_align PARAMS ((int)); @@ -123,7 +122,6 @@ extern const char * arithmetic_instr PARAMS ((rtx, int)); extern void output_ascii_pseudo_op PARAMS ((FILE *, const unsigned char *, int)); extern const char * output_return_instruction PARAMS ((rtx, int, int)); extern void arm_poke_function_name PARAMS ((FILE *, char *)); -extern void output_arm_prologue PARAMS ((FILE *, int)); extern void arm_print_operand PARAMS ((FILE *, rtx, int)); extern void arm_print_operand_address PARAMS ((FILE *, rtx)); extern void arm_final_prescan_insn PARAMS ((rtx)); @@ -160,7 +158,6 @@ extern void thumb_expand_epilogue PARAMS ((void)); extern int is_called_in_ARM_mode PARAMS ((tree)); #endif extern int thumb_shiftable_const PARAMS ((unsigned HOST_WIDE_INT)); -extern void output_thumb_prologue PARAMS ((FILE *)); #ifdef RTX_CODE extern void thumb_final_prescan_insn PARAMS ((rtx)); extern const char * thumb_load_double_from_address diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 24c3317..7d18b71 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -106,6 +106,12 @@ static int arm_valid_type_attribute_p PARAMS ((tree, tree, tree, tree)); static int arm_valid_decl_attribute_p PARAMS ((tree, tree, tree, tree)); +static void arm_output_function_epilogue PARAMS ((FILE *, + HOST_WIDE_INT)); +static void arm_output_function_prologue PARAMS ((FILE *, + HOST_WIDE_INT)); +static void thumb_output_function_prologue PARAMS ((FILE *, + HOST_WIDE_INT)); static int arm_comp_type_attributes PARAMS ((tree, tree)); static void arm_set_default_type_attributes PARAMS ((tree)); #undef Hint @@ -130,6 +136,12 @@ static void arm_set_default_type_attributes PARAMS ((tree)); # define TARGET_VALID_DECL_ATTRIBUTE arm_valid_decl_attribute_p #endif +#undef TARGET_ASM_FUNCTION_PROLOGUE +#define TARGET_ASM_FUNCTION_PROLOGUE arm_output_function_prologue + +#undef TARGET_ASM_FUNCTION_EPILOGUE +#define TARGET_ASM_FUNCTION_EPILOGUE arm_output_function_epilogue + #undef TARGET_COMP_TYPE_ATTRIBUTES #define TARGET_COMP_TYPE_ATTRIBUTES arm_comp_type_attributes @@ -7313,12 +7325,18 @@ arm_poke_function_name (stream, name) /* Place some comments into the assembler stream describing the current function. */ -void -output_arm_prologue (f, frame_size) +static void +arm_output_function_prologue (f, frame_size) FILE * f; - int frame_size; + HOST_WIDE_INT frame_size; { unsigned long func_type; + + if (!TARGET_ARM) + { + thumb_output_function_prologue (f, frame_size); + return; + } /* Sanity check. */ if (arm_ccfsm_state || arm_target_insn) @@ -7637,9 +7655,10 @@ arm_output_epilogue (really_return) return ""; } -void -output_func_epilogue (frame_size) - int frame_size; +static void +arm_output_function_epilogue (file, frame_size) + FILE *file ATTRIBUTE_UNUSED; + HOST_WIDE_INT frame_size; { if (TARGET_THUMB) { @@ -9892,9 +9911,10 @@ thumb_expand_epilogue () emit_insn (gen_blockage ()); } -void -output_thumb_prologue (f) +static void +thumb_output_function_prologue (f, size) FILE * f; + HOST_WIDE_INT size ATTRIBUTE_UNUSED; { int live_regs_mask = 0; int high_regs_pushed = 0; diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h index a4dff6d..59884cd 100644 --- a/gcc/config/arm/arm.h +++ b/gcc/config/arm/arm.h @@ -1532,17 +1532,6 @@ typedef struct (PRETEND_SIZE) = (NUM_ARG_REGS - (CUM).nregs) * UNITS_PER_WORD; \ } -/* Generate assembly output for the start of a function. */ -#define FUNCTION_PROLOGUE(STREAM, SIZE) \ - do \ - { \ - if (TARGET_ARM) \ - output_arm_prologue (STREAM, SIZE); \ - else \ - output_thumb_prologue (STREAM); \ - } \ - while (0) - /* If your target environment doesn't prefix user functions with an underscore, you may wish to re-define this to prevent any conflicts. e.g. AOF may prefix mcount with an underscore. */ @@ -1602,10 +1591,6 @@ typedef struct frame. */ #define EXIT_IGNORE_STACK 1 -/* Generate the assembly code for function exit. */ -#define FUNCTION_EPILOGUE(STREAM, SIZE) \ - output_func_epilogue (SIZE) - #define EPILOGUE_USES(REGNO) (reload_completed && (REGNO) == LR_REGNUM) /* Determine if the epilogue should be output as RTL. |