diff options
| author | geoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-08-31 07:57:54 +0000 |
|---|---|---|
| committer | geoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-08-31 07:57:54 +0000 |
| commit | ac8b36b901ecf1301184713972b16dcd780cf34f (patch) | |
| tree | 24b2c46fc2b1ed7d372a5b59e977b01466ef88d7 | |
| parent | 4037a9708e66ef74f68ac67e6c058e2494768aae (diff) | |
| download | ppe42-gcc-ac8b36b901ecf1301184713972b16dcd780cf34f.tar.gz ppe42-gcc-ac8b36b901ecf1301184713972b16dcd780cf34f.zip | |
* config/stormy16/stormy16.c (stormy16_expand_epilogue): Use
the frame pointer to pop the stack if convenient.
* config/stormy16/stormy16.c (stormy16_initialize_trampoline):
Don't use post-increment before combine.
* config/stormy16/stormy16.h (STATIC_CHAIN_REGNUM): Don't use
a call-saved register.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45314 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/ChangeLog | 10 | ||||
| -rw-r--r-- | gcc/config/stormy16/stormy16.c | 14 | ||||
| -rw-r--r-- | gcc/config/stormy16/stormy16.h | 2 |
3 files changed, 22 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5286b9af01a..5c3b6bd1cc4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2001-08-31 Geoffrey Keating <geoffk@redhat.com> + + * config/stormy16/stormy16.c (stormy16_expand_epilogue): Use + the frame pointer to pop the stack if convenient. + + * config/stormy16/stormy16.c (stormy16_initialize_trampoline): + Don't use post-increment before combine. + * config/stormy16/stormy16.h (STATIC_CHAIN_REGNUM): Don't use + a call-saved register. + 2001-08-31 Andreas Jaeger <aj@suse.de> * jump.c (mark_jump_label): Revert patch from 2001-08-28, the diff --git a/gcc/config/stormy16/stormy16.c b/gcc/config/stormy16/stormy16.c index c29bc085d95..758b97770b6 100644 --- a/gcc/config/stormy16/stormy16.c +++ b/gcc/config/stormy16/stormy16.c @@ -1023,8 +1023,13 @@ stormy16_expand_epilogue () /* Pop the stack for the locals. */ if (layout.locals_size) - emit_addhi3_postreload (stack_pointer_rtx, stack_pointer_rtx, - GEN_INT (- layout.locals_size)); + { + if (frame_pointer_needed && layout.sp_minus_fp == layout.locals_size) + emit_move_insn (stack_pointer_rtx, hard_frame_pointer_rtx); + else + emit_addhi3_postreload (stack_pointer_rtx, stack_pointer_rtx, + GEN_INT (- layout.locals_size)); + } /* Restore any call-saved registers. */ for (regno = FIRST_PSEUDO_REGISTER - 1; regno >= 0; regno--) @@ -1262,18 +1267,21 @@ stormy16_initialize_trampoline (addr, fnaddr, static_chain) rtx reg_fnaddr = gen_reg_rtx (HImode); rtx reg_addr_mem; - reg_addr_mem = gen_rtx_MEM (HImode, gen_rtx_POST_INC (Pmode, reg_addr)); + reg_addr_mem = gen_rtx_MEM (HImode, reg_addr); emit_move_insn (reg_addr, addr); emit_move_insn (temp, GEN_INT (0x3130 | STATIC_CHAIN_REGNUM)); emit_move_insn (reg_addr_mem, temp); + emit_insn (gen_addhi3 (reg_addr, reg_addr, const2_rtx)); emit_move_insn (temp, static_chain); emit_move_insn (reg_addr_mem, temp); + emit_insn (gen_addhi3 (reg_addr, reg_addr, const2_rtx)); emit_move_insn (reg_fnaddr, fnaddr); emit_move_insn (temp, reg_fnaddr); emit_insn (gen_andhi3 (temp, temp, GEN_INT (0xFF))); emit_insn (gen_iorhi3 (temp, temp, GEN_INT (0x0200))); emit_move_insn (reg_addr_mem, temp); + emit_insn (gen_addhi3 (reg_addr, reg_addr, const2_rtx)); emit_insn (gen_lshrhi3 (reg_fnaddr, reg_fnaddr, GEN_INT (8))); emit_move_insn (reg_addr_mem, reg_fnaddr); } diff --git a/gcc/config/stormy16/stormy16.h b/gcc/config/stormy16/stormy16.h index 7310e6cdc1b..9a3b1193084 100644 --- a/gcc/config/stormy16/stormy16.h +++ b/gcc/config/stormy16/stormy16.h @@ -1785,7 +1785,7 @@ enum reg_class If the static chain is passed in memory, these macros should not be defined; instead, the next two macros should be defined. */ -#define STATIC_CHAIN_REGNUM 12 +#define STATIC_CHAIN_REGNUM 1 /* #define STATIC_CHAIN_INCOMING_REGNUM */ /* If the static chain is passed in memory, these macros provide rtx giving |

