pa.h (TRAMPOLINE_TEMPLATE): Add two words to the template for non 64-bit machines.

* pa.h (TRAMPOLINE_TEMPLATE): Add two words to the template for
	non 64-bit machines.  Use these as a plabel for the trampoline.
	(TRAMPOLINE_SIZE): Adjust size for new words.
	(INITIALIZE_TRAMPOLINE): Initialize new words.
	(TRAMPOLINE_ADJUST_ADDRESS): New.  Adjust address to make it a
	pointer to the plabel in the trampoline.

From-SVN: r45776
This commit is contained in:
John David Anglin 2001-09-24 16:21:09 +00:00 committed by John David Anglin
parent b848dc65c4
commit 8e1494b72c
2 changed files with 29 additions and 3 deletions

View File

@ -1,3 +1,12 @@
2001-09-24 John David Anglin <dave@hiauly1.hia.nrc.ca>
* pa.h (TRAMPOLINE_TEMPLATE): Add two words to the template for
non 64-bit machines. Use these as a plabel for the trampoline.
(TRAMPOLINE_SIZE): Adjust size for new words.
(INITIALIZE_TRAMPOLINE): Initialize new words.
(TRAMPOLINE_ADJUST_ADDRESS): New. Adjust address to make it a
pointer to the plabel in the trampoline.
2001-09-24 John David Anglin <dave@hiauly1.hia.nrc.ca>
* pa.c (function_arg): Pass floating arguments in both general and

View File

@ -922,6 +922,8 @@ extern int may_call_alloca;
fputs ("\tldw 40(%r22),%r29\n", FILE); \
fputs ("\t.word 0\n", FILE); \
fputs ("\t.word 0\n", FILE); \
fputs ("\t.word 0\n", FILE); \
fputs ("\t.word 0\n", FILE); \
} \
else \
{ \
@ -949,14 +951,17 @@ extern int may_call_alloca;
If the code part of the trampoline ever grows to > 32 bytes, then it
will become necessary to hack on the cacheflush pattern in pa.md. */
#define TRAMPOLINE_SIZE (TARGET_64BIT ? 72 : 11 * 4)
#define TRAMPOLINE_SIZE (TARGET_64BIT ? 72 : 52)
/* Emit RTL insns to initialize the variable parts of a trampoline.
FNADDR is an RTX for the address of the function's pure code.
CXT is an RTX for the static chain value for the function.
Move the function address to the trampoline template at offset 12.
Move the static chain value to trampoline template at offset 16. */
Move the function address to the trampoline template at offset 36.
Move the static chain value to trampoline template at offset 40.
Move the trampoline address to trampoline template at offset 44.
Move r19 to trampoline template at offset 48. The latter two
words create a plabel for the indirect call to the trampoline. */
#define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \
{ \
@ -968,6 +973,11 @@ extern int may_call_alloca;
emit_move_insn (gen_rtx_MEM (Pmode, start_addr), (FNADDR)); \
start_addr = memory_address (Pmode, plus_constant ((TRAMP), 40)); \
emit_move_insn (gen_rtx_MEM (Pmode, start_addr), (CXT)); \
start_addr = memory_address (Pmode, plus_constant ((TRAMP), 44)); \
emit_move_insn (gen_rtx_MEM (Pmode, start_addr), (TRAMP)); \
start_addr = memory_address (Pmode, plus_constant ((TRAMP), 48)); \
emit_move_insn (gen_rtx_MEM (Pmode, start_addr), \
gen_rtx_REG (Pmode, 19)); \
/* fdc and fic only use registers for the address to flush, \
they do not accept integer displacements. */ \
start_addr = force_reg (Pmode, (TRAMP)); \
@ -1003,6 +1013,13 @@ extern int may_call_alloca;
} \
}
/* Perform any machine-specific adjustment in the address of the trampoline.
ADDR contains the address that was passed to INITIALIZE_TRAMPOLINE.
Adjust the trampoline address to point to the plabel at offset 44. */
#define TRAMPOLINE_ADJUST_ADDRESS(ADDR) \
if (!TARGET_64BIT) (ADDR) = memory_address (Pmode, plus_constant ((ADDR), 46))
/* Emit code for a call to builtin_saveregs. We must emit USE insns which
reference the 4 integer arg registers and 4 fp arg registers.
Ordinarily they are not call used registers, but they are for