From ec4ad0f9c742ff5dd76b3956c26d9da617dd0b7b Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Tue, 9 Jan 2001 10:31:32 +0000 Subject: [PATCH] sh.h (STATIC_CHAIN_REGNUM): Change from r13 to r3. * config/sh/sh.h (STATIC_CHAIN_REGNUM): Change from r13 to r3. (INITIALIZE_TRAMPOLINE): Adjust accordingly. * config/sh/sh.c (sh_expand_prologue): Use r1 as temporary for stack adjusts, instead of r3. From-SVN: r38823 --- gcc/ChangeLog | 7 +++++++ gcc/config/sh/sh.c | 4 ++-- gcc/config/sh/sh.h | 14 +++++++------- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 81c6a018b79..06db9b5fc64 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2001-01-09 Alexandre Oliva + + * config/sh/sh.h (STATIC_CHAIN_REGNUM): Change from r13 to r3. + (INITIALIZE_TRAMPOLINE): Adjust accordingly. + * config/sh/sh.c (sh_expand_prologue): Use r1 as temporary for + stack adjusts, instead of r3. + 2001-01-09 Michael Hayes * flow.c (flow_loop_scan): Break out of ... diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index ec88c59a6fa..158714cea50 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -3922,7 +3922,7 @@ sh_expand_prologue () /* We have pretend args if we had an object sent partially in registers and partially on the stack, e.g. a large structure. */ output_stack_adjust (-current_function_pretend_args_size, - stack_pointer_rtx, 3); + stack_pointer_rtx, 1); extra_push = 0; @@ -3970,7 +3970,7 @@ sh_expand_prologue () target_flags = save_flags; output_stack_adjust (-rounded_frame_size (d), - stack_pointer_rtx, 3); + stack_pointer_rtx, 1); if (frame_pointer_needed) emit_insn (gen_movsi (frame_pointer_rtx, stack_pointer_rtx)); diff --git a/gcc/config/sh/sh.h b/gcc/config/sh/sh.h index f337cc9abbc..e78a46123a5 100644 --- a/gcc/config/sh/sh.h +++ b/gcc/config/sh/sh.h @@ -649,7 +649,7 @@ do { \ #define ARG_POINTER_REGNUM AP_REG /* Register in which the static-chain is passed to a function. */ -#define STATIC_CHAIN_REGNUM 13 +#define STATIC_CHAIN_REGNUM 3 /* The register in which a struct value address is passed. */ @@ -1223,12 +1223,12 @@ extern int current_function_anonymous_args; /* On the SH, the trampoline looks like - 2 0002 DD02 mov.l l2,r13 + 2 0002 D202 mov.l l2,r2 1 0000 D301 mov.l l1,r3 - 3 0004 4D2B jmp @r13 + 3 0004 422B jmp @r2 4 0006 0009 nop - 5 0008 00000000 l1: .long function - 6 000c 00000000 l2: .long area */ + 5 0008 00000000 l1: .long area + 6 000c 00000000 l2: .long function */ /* Length in units of the trampoline for entering a nested function. */ #define TRAMPOLINE_SIZE 16 @@ -1244,9 +1244,9 @@ extern int current_function_anonymous_args; #define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) do \ { \ emit_move_insn (gen_rtx_MEM (SImode, (TRAMP)), \ - GEN_INT (TARGET_LITTLE_ENDIAN ? 0xd301dd02 : 0xdd02d301));\ + GEN_INT (TARGET_LITTLE_ENDIAN ? 0xd301d202 : 0xd202d301));\ emit_move_insn (gen_rtx_MEM (SImode, plus_constant ((TRAMP), 4)), \ - GEN_INT (TARGET_LITTLE_ENDIAN ? 0x00094d2b : 0x4d2b0009));\ + GEN_INT (TARGET_LITTLE_ENDIAN ? 0x0009422b : 0x422b0009));\ emit_move_insn (gen_rtx_MEM (SImode, plus_constant ((TRAMP), 8)), \ (CXT)); \ emit_move_insn (gen_rtx_MEM (SImode, plus_constant ((TRAMP), 12)), \