aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1993-11-30 19:29:55 -0500
committerRichard Kenner <kenner@gcc.gnu.org>1993-11-30 19:29:55 -0500
commit6098b63e5b28dc8955a4f58d03c7223f04de06a5 (patch)
treecafc4f897d7c9a5d30e07b5ed37b738e3a3ff80e /gcc
parentf74c83fd7a46fdeda1c0980a3dd63bd74e9daaf4 (diff)
downloadgcc-6098b63e5b28dc8955a4f58d03c7223f04de06a5.zip
gcc-6098b63e5b28dc8955a4f58d03c7223f04de06a5.tar.gz
gcc-6098b63e5b28dc8955a4f58d03c7223f04de06a5.tar.bz2
(STATIC_CHAIN_REGNUM): Use %g2; %g1 is reserved for prologue.
(TRAMPOLINE_TEMPLATE, INITIALIZE_TRAMPOLINE): Swap useage of %g1 and %g2. From-SVN: r6171
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/sparc/sparc.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h
index 6fa5640..42a91ef 100644
--- a/gcc/config/sparc/sparc.h
+++ b/gcc/config/sparc/sparc.h
@@ -449,9 +449,9 @@ extern int leaf_function;
/* Base register for access to arguments of the function. */
#define ARG_POINTER_REGNUM 30
-/* Register in which static-chain is passed to a function. */
-/* ??? */
-#define STATIC_CHAIN_REGNUM 1
+/* Register in which static-chain is passed to a function. This must
+ not be a register used by the prologue. */
+#define STATIC_CHAIN_REGNUM 2
/* Register which holds offset table for position-independent
data references. */
@@ -994,17 +994,17 @@ extern union tree_node *current_function_decl;
of a trampoline, leaving space for the variable parts. */
/* On the sparc, the trampoline contains five instructions:
- sethi #TOP_OF_FUNCTION,%g2
- or #BOTTOM_OF_FUNCTION,%g2,%g2
- sethi #TOP_OF_STATIC,%g1
- jmp g2
- or #BOTTOM_OF_STATIC,%g1,%g1 */
+ sethi #TOP_OF_FUNCTION,%g1
+ or #BOTTOM_OF_FUNCTION,%g1,%g1
+ sethi #TOP_OF_STATIC,%g2
+ jmp g1
+ or #BOTTOM_OF_STATIC,%g2,%g2 */
#define TRAMPOLINE_TEMPLATE(FILE) \
{ \
ASM_OUTPUT_INT (FILE, gen_rtx (CONST_INT, VOIDmode, 0x00000000)); \
ASM_OUTPUT_INT (FILE, gen_rtx (CONST_INT, VOIDmode, 0x00000000)); \
ASM_OUTPUT_INT (FILE, gen_rtx (CONST_INT, VOIDmode, 0x00000000)); \
- ASM_OUTPUT_INT (FILE, gen_rtx (CONST_INT, VOIDmode, 0x81C08000)); \
+ ASM_OUTPUT_INT (FILE, gen_rtx (CONST_INT, VOIDmode, 0x81C04000)); \
ASM_OUTPUT_INT (FILE, gen_rtx (CONST_INT, VOIDmode, 0x00000000)); \
}
@@ -1041,16 +1041,16 @@ extern union tree_node *current_function_decl;
rtx g2_ori = gen_rtx (HIGH, SImode, \
gen_rtx (CONST_INT, VOIDmode, 0x8410A000)); \
rtx tem = gen_reg_rtx (SImode); \
- emit_move_insn (tem, g2_sethi); \
+ emit_move_insn (tem, g1_sethi); \
emit_insn (gen_iorsi3 (high_fn, high_fn, tem)); \
emit_move_insn (gen_rtx (MEM, SImode, plus_constant (TRAMP, 0)), high_fn);\
- emit_move_insn (tem, g2_ori); \
+ emit_move_insn (tem, g1_ori); \
emit_insn (gen_iorsi3 (low_fn, low_fn, tem)); \
emit_move_insn (gen_rtx (MEM, SImode, plus_constant (TRAMP, 4)), low_fn);\
- emit_move_insn (tem, g1_sethi); \
+ emit_move_insn (tem, g2_sethi); \
emit_insn (gen_iorsi3 (high_cxt, high_cxt, tem)); \
emit_move_insn (gen_rtx (MEM, SImode, plus_constant (TRAMP, 8)), high_cxt);\
- emit_move_insn (tem, g1_ori); \
+ emit_move_insn (tem, g2_ori); \
emit_insn (gen_iorsi3 (low_cxt, low_cxt, tem)); \
emit_move_insn (gen_rtx (MEM, SImode, plus_constant (TRAMP, 16)), low_cxt);\
emit_insn (gen_rtx (UNSPEC_VOLATILE, VOIDmode, \