diff options
author | Stanislaw Skowronek <skylark@linux-mips.org> | 2006-05-02 12:57:52 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2006-05-02 12:57:52 +0000 |
commit | d541888b0f2aeedb039751c7bb0d1e45dc775a38 (patch) | |
tree | 3818a5be99044fa7f154df891ef056c097310a62 /gcc | |
parent | 7a7017bc20fdda8b27baa76f8e393a9dd54339bb (diff) | |
download | gcc-d541888b0f2aeedb039751c7bb0d1e45dc775a38.zip gcc-d541888b0f2aeedb039751c7bb0d1e45dc775a38.tar.gz gcc-d541888b0f2aeedb039751c7bb0d1e45dc775a38.tar.bz2 |
re PR target/25871 (TRAMPOLINE_TEMPLATE uses 32bit moves on 64bit code)
2006-05-02 Joshua Kinard <kumba@gentoo.org>
PR target/25871
* gcc/config/mips/mips.h (TRAMPOLINE_TEMPLATE): Avoid 32-bit moves
with 64-bit pointers.
From-SVN: r113460
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/mips/mips.h | 15 |
2 files changed, 16 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 01df171..e1e0e22 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2006-05-02 Joshua Kinard <kumba@gentoo.org> + + PR target/25871 + * gcc/config/mips/mips.h (TRAMPOLINE_TEMPLATE): Avoid 32-bit moves + with 64-bit pointers. + 2006-05-02 Paul Brook <paul@codesourcery.com> * config/arm/arm.c (add_minipool_forward_ref): Check if insn diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h index 3823963..60e1aca 100644 --- a/gcc/config/mips/mips.h +++ b/gcc/config/mips/mips.h @@ -2023,31 +2023,36 @@ typedef struct mips_args { This code should not include a label--the label is taken care of automatically. */ -#define TRAMPOLINE_TEMPLATE(STREAM) \ -{ \ - fprintf (STREAM, "\t.word\t0x03e00821\t\t# move $1,$31\n"); \ +#define TRAMPOLINE_TEMPLATE(STREAM) \ +{ \ + if (ptr_mode == DImode) \ + fprintf (STREAM, "\t.word\t0x03e0082d\t\t# dmove $1,$31\n"); \ + else \ + fprintf (STREAM, "\t.word\t0x03e00821\t\t# move $1,$31\n"); \ fprintf (STREAM, "\t.word\t0x04110001\t\t# bgezal $0,.+8\n"); \ fprintf (STREAM, "\t.word\t0x00000000\t\t# nop\n"); \ if (ptr_mode == DImode) \ { \ fprintf (STREAM, "\t.word\t0xdfe30014\t\t# ld $3,20($31)\n"); \ fprintf (STREAM, "\t.word\t0xdfe2001c\t\t# ld $2,28($31)\n"); \ + fprintf (STREAM, "\t.word\t0x0060c82d\t\t# dmove $25,$3\n"); \ } \ else \ { \ fprintf (STREAM, "\t.word\t0x8fe30014\t\t# lw $3,20($31)\n"); \ fprintf (STREAM, "\t.word\t0x8fe20018\t\t# lw $2,24($31)\n"); \ + fprintf (STREAM, "\t.word\t0x0060c821\t\t# move $25,$3\n"); \ } \ - fprintf (STREAM, "\t.word\t0x0060c821\t\t# move $25,$3 (abicalls)\n"); \ fprintf (STREAM, "\t.word\t0x00600008\t\t# jr $3\n"); \ - fprintf (STREAM, "\t.word\t0x0020f821\t\t# move $31,$1\n"); \ if (ptr_mode == DImode) \ { \ + fprintf (STREAM, "\t.word\t0x0020f82d\t\t# dmove $31,$1\n"); \ fprintf (STREAM, "\t.dword\t0x00000000\t\t# <function address>\n"); \ fprintf (STREAM, "\t.dword\t0x00000000\t\t# <static chain value>\n"); \ } \ else \ { \ + fprintf (STREAM, "\t.word\t0x0020f821\t\t# move $31,$1\n"); \ fprintf (STREAM, "\t.word\t0x00000000\t\t# <function address>\n"); \ fprintf (STREAM, "\t.word\t0x00000000\t\t# <static chain value>\n"); \ } \ |