microblaze.c (microblaze_asm_trampoline_template): Replace with a microblaze version.
* config/microblaze/microblaze.c (microblaze_asm_trampoline_template): Replace with a microblaze version. (microblaze_trampoline_init): Adapt for microblaze. * gcc/config/microblaze/microblaze.h (TRAMPOLINE_SIZE): Adapt for microblaze. From-SVN: r196103
This commit is contained in:
parent
b41288b3a5
commit
8ec77be0fc
@ -1,3 +1,11 @@
|
||||
2013-02-16 Edgar E. Iglesias <edgar.iglesias@gmail.com>
|
||||
|
||||
* config/microblaze/microblaze.c (microblaze_asm_trampoline_template):
|
||||
Replace with a microblaze version.
|
||||
(microblaze_trampoline_init): Adapt for microblaze.
|
||||
* gcc/config/microblaze/microblaze.h (TRAMPOLINE_SIZE): Adapt for
|
||||
microblaze.
|
||||
|
||||
2013-02-16 Jakub Jelinek <jakub@redhat.com>
|
||||
Dodji Seketeli <dodji@redhat.com>
|
||||
|
||||
|
@ -2776,14 +2776,10 @@ microblaze_elf_asm_init_sections (void)
|
||||
static void
|
||||
microblaze_asm_trampoline_template (FILE *f)
|
||||
{
|
||||
fprintf (f, "\t.word\t0x03e00821\t\t# move $1,$31\n");
|
||||
fprintf (f, "\t.word\t0x04110001\t\t# bgezal $0,.+8\n");
|
||||
fprintf (f, "\t.word\t0x00000000\t\t# nop\n");
|
||||
fprintf (f, "\t.word\t0x8fe30014\t\t# lw $3,20($31)\n");
|
||||
fprintf (f, "\t.word\t0x8fe20018\t\t# lw $2,24($31)\n");
|
||||
fprintf (f, "\t.word\t0x0060c821\t\t# move $25,$3 (abicalls)\n");
|
||||
fprintf (f, "\t.word\t0x00600008\t\t# jr $3\n");
|
||||
fprintf (f, "\t.word\t0x0020f821\t\t# move $31,$1\n");
|
||||
fprintf (f, "\tmfs r18, rpc\n");
|
||||
fprintf (f, "\tlwi r3, r18, 16\n");
|
||||
fprintf (f, "\tlwi r18, r18, 20\n");
|
||||
fprintf (f, "\tbra r18\n");
|
||||
/* fprintf (f, "\t.word\t0x00000000\t\t# <function address>\n"); */
|
||||
/* fprintf (f, "\t.word\t0x00000000\t\t# <static chain value>\n"); */
|
||||
}
|
||||
@ -2797,11 +2793,11 @@ microblaze_trampoline_init (rtx m_tramp, tree fndecl, rtx chain_value)
|
||||
rtx mem;
|
||||
|
||||
emit_block_move (m_tramp, assemble_trampoline_template (),
|
||||
GEN_INT (8*UNITS_PER_WORD), BLOCK_OP_NORMAL);
|
||||
GEN_INT (6*UNITS_PER_WORD), BLOCK_OP_NORMAL);
|
||||
|
||||
mem = adjust_address (m_tramp, SImode, 8);
|
||||
mem = adjust_address (m_tramp, SImode, 16);
|
||||
emit_move_insn (mem, chain_value);
|
||||
mem = adjust_address (m_tramp, SImode, 12);
|
||||
mem = adjust_address (m_tramp, SImode, 20);
|
||||
emit_move_insn (mem, fnaddr);
|
||||
}
|
||||
|
||||
|
@ -499,7 +499,8 @@ typedef struct microblaze_args
|
||||
|
||||
#define EXIT_IGNORE_STACK 1
|
||||
|
||||
#define TRAMPOLINE_SIZE (32 + 8)
|
||||
/* 4 insns + 2 words of data. */
|
||||
#define TRAMPOLINE_SIZE (6 * 4)
|
||||
|
||||
#define TRAMPOLINE_ALIGNMENT 32
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user