aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/mips/mips.h
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2009-10-05 19:45:54 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2009-10-05 19:45:54 +0000
commitc640a3bd210fb2fddbfc5118e37a99dbe8a0a14b (patch)
tree525e11396150f9067933a78b22862a0296eebd0a /gcc/config/mips/mips.h
parent293593b15fbf08603d6fa038e8e4614b41166c9f (diff)
downloadgcc-c640a3bd210fb2fddbfc5118e37a99dbe8a0a14b.zip
gcc-c640a3bd210fb2fddbfc5118e37a99dbe8a0a14b.tar.gz
gcc-c640a3bd210fb2fddbfc5118e37a99dbe8a0a14b.tar.bz2
mips-protos.h (mips_trampoline_code_size): Declare.
gcc/ * config/mips/mips-protos.h (mips_trampoline_code_size): Declare. * config/mips/mips.h (TRAMPOLINE_SIZE): Redefine as the size of a code block followed by two pointers. (TRAMPOLINE_ALIGNMENT): Define to 64 for 32-bit targets too. * config/mips/mips.c (MIPS_LOAD_PTR): New macro. (MIPS_MOVE): Likewise. (MIPS_LUI): Likewise. (MIPS_JR): Likewise. (MIPS_BAL): Likewise. (MIPS_NOP): Likewise. (mips_asm_trampoline_template): Delete. (mips_trampoline_code_size): New function. (mips_trampoline_init): Add shorter sequences for all cases except Pmode == DImoe && !TARGET_USE_PIC_FN_ADDR_REG. Calculate the opcodes directly, rather than copying from a template. Only flush the code part of the trampoline. (TARGET_ASM_TRAMPOLINE_TEMPLATE): Delete. From-SVN: r152466
Diffstat (limited to 'gcc/config/mips/mips.h')
-rw-r--r--gcc/config/mips/mips.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h
index b17512f..50bc4ea 100644
--- a/gcc/config/mips/mips.h
+++ b/gcc/config/mips/mips.h
@@ -2433,14 +2433,15 @@ typedef struct mips_args {
#define EXIT_IGNORE_STACK 1
-/* A C expression for the size in bytes of the trampoline, as an
- integer. */
+/* Trampolines are a block of code followed by two pointers. */
-#define TRAMPOLINE_SIZE (ptr_mode == DImode ? 48 : 36)
+#define TRAMPOLINE_SIZE \
+ (mips_trampoline_code_size () + GET_MODE_SIZE (ptr_mode) * 2)
-/* Alignment required for trampolines, in bits. */
+/* Forcing a 64-bit alignment for 32-bit targets allows us to load two
+ pointers from a single LUI base. */
-#define TRAMPOLINE_ALIGNMENT GET_MODE_BITSIZE (ptr_mode)
+#define TRAMPOLINE_ALIGNMENT 64
/* mips_trampoline_init calls this library function to flush
program and data caches. */