summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpbrook <pbrook@138bc75d-0d04-0410-961f-82ee72b054a4>2005-05-01 15:28:53 +0000
committerpbrook <pbrook@138bc75d-0d04-0410-961f-82ee72b054a4>2005-05-01 15:28:53 +0000
commitf2628799c26d77bf0cb6dc5308729be868e4de5c (patch)
tree5f2da4acd08aad9e6f77eedc2d21e93f48290d02
parent176ce009f0746d840b06fca6a4353d687378ed0f (diff)
downloadgcc-f2628799c26d77bf0cb6dc5308729be868e4de5c.tar.gz
2005-01-05 Paul Brook <paul@codesourcery.com>
* config/arm/arm.h (ARM_EMIT_TRAMPOLINE_CACHE_CLEAR): Define. (INITIALIZE_TRAMPOLINE): Use it. * config/arm/linux-gas.h (INITIALIZE_TRAMPOLINE): Remove. * config/arm/netbsd.h (INITIALIZE_TRAMPOLINE): Remove. * config/arm/netbsd-elf.h (INITIALIZE_TRAMPOLINE): Remove. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99068 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/config/arm/arm.h11
-rw-r--r--gcc/config/arm/linux-gas.h13
-rw-r--r--gcc/config/arm/netbsd-elf.h15
-rw-r--r--gcc/config/arm/netbsd.h13
5 files changed, 19 insertions, 41 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1148ec25069..db25a0a0843 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2005-01-05 Paul Brook <paul@codesourcery.com>
+
+ * config/arm/arm.h (ARM_EMIT_TRAMPOLINE_CACHE_CLEAR): Define.
+ (INITIALIZE_TRAMPOLINE): Use it.
+ * config/arm/linux-gas.h (INITIALIZE_TRAMPOLINE): Remove.
+ * config/arm/netbsd.h (INITIALIZE_TRAMPOLINE): Remove.
+ * config/arm/netbsd-elf.h (INITIALIZE_TRAMPOLINE): Remove.
+
2005-05-01 Gerald Pfeifer <gerald@pfeifer.com>
* doc/install.texi (Specific): Omit dots in the @anchors names
diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
index 6310a627e60..2fcf63f5fd8 100644
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
@@ -1986,6 +1986,16 @@ typedef struct
/* Alignment required for a trampoline in bits. */
#define TRAMPOLINE_ALIGNMENT 32
+/* Call __clear_cache after setting up the trampoline unless this is a nop. */
+#ifdef CLEAR_INSN_CACHE
+#define ARM_EMIT_TRAMPOLINE_CACHE_CLEAR(TRAMP) \
+ emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__clear_cache"), \
+ 0, VOIDmode, 2, TRAMP, Pmode, \
+ plus_constant (TRAMP, TRAMPOLINE_SIZE), Pmode);
+#else
+#define ARM_EMIT_TRAMPOLINE_CACHE_CLEAR(TRAMP) do {} while (0)
+#endif
+
/* 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. */
@@ -2000,6 +2010,7 @@ typedef struct
plus_constant (TRAMP, \
TARGET_ARM ? 12 : 20)), \
FNADDR); \
+ ARM_EMIT_TRAMPOLINE_CACHE_CLEAR (TRAMP); \
}
#endif
diff --git a/gcc/config/arm/linux-gas.h b/gcc/config/arm/linux-gas.h
index 85ae98a5eff..45afa6e185b 100644
--- a/gcc/config/arm/linux-gas.h
+++ b/gcc/config/arm/linux-gas.h
@@ -42,19 +42,6 @@
#undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE BITS_PER_WORD
-/* Emit code to set up a trampoline and synchronize the caches. */
-#undef INITIALIZE_TRAMPOLINE
-#define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \
-{ \
- emit_move_insn (gen_rtx_MEM (SImode, plus_constant ((TRAMP), 8)), \
- (CXT)); \
- emit_move_insn (gen_rtx_MEM (SImode, plus_constant ((TRAMP), 12)), \
- (FNADDR)); \
- emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__clear_cache"), \
- 0, VOIDmode, 2, TRAMP, Pmode, \
- plus_constant (TRAMP, TRAMPOLINE_SIZE), Pmode); \
-}
-
/* Clear the instruction cache from `beg' to `end'. This makes an
inline system call to SYS_cacheflush. */
#define CLEAR_INSN_CACHE(BEG, END) \
diff --git a/gcc/config/arm/netbsd-elf.h b/gcc/config/arm/netbsd-elf.h
index 9cf47c76188..602619f282a 100644
--- a/gcc/config/arm/netbsd-elf.h
+++ b/gcc/config/arm/netbsd-elf.h
@@ -136,21 +136,6 @@
#undef DEFAULT_STRUCTURE_SIZE_BOUNDARY
#define DEFAULT_STRUCTURE_SIZE_BOUNDARY 8
-/* Emit code to set up a trampoline and synchronize the caches. */
-#undef INITIALIZE_TRAMPOLINE
-#define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \
-do \
- { \
- emit_move_insn (gen_rtx_MEM (SImode, plus_constant ((TRAMP), 8)), \
- (CXT)); \
- emit_move_insn (gen_rtx_MEM (SImode, plus_constant ((TRAMP), 12)), \
- (FNADDR)); \
- emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__clear_cache"), \
- 0, VOIDmode, 2, TRAMP, Pmode, \
- plus_constant (TRAMP, TRAMPOLINE_SIZE), Pmode); \
- } \
-while (0)
-
/* Clear the instruction cache from `BEG' to `END'. This makes a
call to the ARM_SYNC_ICACHE architecture specific syscall. */
#define CLEAR_INSN_CACHE(BEG, END) \
diff --git a/gcc/config/arm/netbsd.h b/gcc/config/arm/netbsd.h
index 8b9e437a66b..59a7b8043f8 100644
--- a/gcc/config/arm/netbsd.h
+++ b/gcc/config/arm/netbsd.h
@@ -138,19 +138,6 @@
#undef DEFAULT_STRUCTURE_SIZE_BOUNDARY
#define DEFAULT_STRUCTURE_SIZE_BOUNDARY 8
-/* Emit code to set up a trampoline and synchronize the caches. */
-#undef INITIALIZE_TRAMPOLINE
-#define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \
-{ \
- emit_move_insn (gen_rtx_MEM (SImode, plus_constant ((TRAMP), 8)), \
- (CXT)); \
- emit_move_insn (gen_rtx_MEM (SImode, plus_constant ((TRAMP), 12)), \
- (FNADDR)); \
- emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__clear_cache"), \
- 0, VOIDmode, 2, TRAMP, Pmode, \
- plus_constant (TRAMP, TRAMPOLINE_SIZE), Pmode); \
-}
-
/* Clear the instruction cache from `BEG' to `END'. This makes a
call to the ARM32_SYNC_ICACHE architecture specific syscall. */
#define CLEAR_INSN_CACHE(BEG, END) \