mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-24 17:19:44 +08:00
fr30.h (TRAMPOLINE_TEMPLATE): Use nops to ensure the static chain and destination functions are 32bit aligned...
* fr30.h (TRAMPOLINE_TEMPLATE): Use nops to ensure the static chain and destination functions are 32bit aligned within the trampoline. (TRAMPOLINE_SIZE, INITIALIZE_TRAMPOLINE): Corresponding changes. (TRAMPOLINE_ALIGNMENT): Define. From-SVN: r31409
This commit is contained in:
parent
b2eadaa201
commit
254a8f0dbe
@ -1,5 +1,10 @@
|
||||
Fri Jan 14 00:28:06 2000 Jeffrey A Law (law@cygnus.com)
|
||||
|
||||
* fr30.h (TRAMPOLINE_TEMPLATE): Use nops to ensure the static chain
|
||||
and destination functions are 32bit aligned within the trampoline.
|
||||
(TRAMPOLINE_SIZE, INITIALIZE_TRAMPOLINE): Corresponding changes.
|
||||
(TRAMPOLINE_ALIGNMENT): Define.
|
||||
|
||||
* cse.c (cse_insn): When changing (set (pc) (reg)) to
|
||||
(set (pc) (label_ref)), verify the change creates a valid insn.
|
||||
|
||||
|
@ -1139,22 +1139,36 @@ typedef int CUMULATIVE_ARGS;
|
||||
|
||||
/* On the FR30, the trampoline is:
|
||||
|
||||
nop
|
||||
ldi:32 STATIC, r12
|
||||
nop
|
||||
ldi:32 FUNCTION, r0
|
||||
jmp @r0 */
|
||||
jmp @r0
|
||||
|
||||
The no-ops are to guarantee that the the static chain and final
|
||||
target are 32 bit ailgned within the trampoline. That allows us to
|
||||
initialize those locations with simple SImode stores. The alternative
|
||||
would be to use HImode stores. */
|
||||
|
||||
/* A C statement to output, on the stream FILE, assembler code for a block of
|
||||
data that contains the constant parts of a trampoline. This code should not
|
||||
include a label--the label is taken care of automatically. */
|
||||
#define TRAMPOLINE_TEMPLATE(FILE) \
|
||||
{ \
|
||||
fprintf (FILE, "\tnop\n"); \
|
||||
fprintf (FILE, "\tldi:32\t#0, %s\n", reg_names [STATIC_CHAIN_REGNUM]); \
|
||||
fprintf (FILE, "\tnop\n"); \
|
||||
fprintf (FILE, "\tldi:32\t#0, %s\n", reg_names [COMPILER_SCRATCH_REGISTER]); \
|
||||
fprintf (FILE, "\tjmp\t@%s\n", reg_names [COMPILER_SCRATCH_REGISTER]); \
|
||||
}
|
||||
|
||||
/* A C expression for the size in bytes of the trampoline, as an integer. */
|
||||
#define TRAMPOLINE_SIZE 14
|
||||
#define TRAMPOLINE_SIZE 18
|
||||
|
||||
/* We want the trampoline to be aligned on a 32bit boundary so that we can
|
||||
make sure the location of the static chain & target function within
|
||||
the trampoline is also aligned on a 32bit boundary. */
|
||||
#define TRAMPOLINE_ALIGNMENT 32
|
||||
|
||||
/* A C statement to initialize the variable parts of a trampoline. ADDR is an
|
||||
RTX for the address of the trampoline; FNADDR is an RTX for the address of
|
||||
@ -1163,8 +1177,8 @@ typedef int CUMULATIVE_ARGS;
|
||||
#define INITIALIZE_TRAMPOLINE(ADDR, FNADDR, STATIC_CHAIN) \
|
||||
do \
|
||||
{ \
|
||||
emit_move_insn (gen_rtx (MEM, SImode, plus_constant (ADDR, 2)), STATIC_CHAIN);\
|
||||
emit_move_insn (gen_rtx (MEM, SImode, plus_constant (ADDR, 8)), FNADDR); \
|
||||
emit_move_insn (gen_rtx (MEM, SImode, plus_constant (ADDR, 4)), STATIC_CHAIN);\
|
||||
emit_move_insn (gen_rtx (MEM, SImode, plus_constant (ADDR, 12)), FNADDR); \
|
||||
} while (0);
|
||||
|
||||
/*}}}*/
|
||||
|
Loading…
Reference in New Issue
Block a user