netbsd.h (INITIALIZE_TRAMPOLINE): Redefine.

* config/arm/netbsd.h (INITIALIZE_TRAMPOLINE): Redefine.
	(CLEAR_INSN_CACHE): Define.

From-SVN: r56954
This commit is contained in:
Krister Walfridsson 2002-09-08 18:06:18 +02:00 committed by Krister Walfridsson
parent f69257d6af
commit e2f97e264e
2 changed files with 32 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2002-09-08 Krister Walfridsson <cato@df.lth.se>
* config/arm/netbsd.h (INITIALIZE_TRAMPOLINE): Redefine.
(CLEAR_INSN_CACHE): Define.
2002-09-08 Kazu Hirata <kazu@cs.umass.edu>
* basic-block.h: Fix comment formatting.

View File

@ -147,3 +147,30 @@ Boston, MA 02111-1307, USA. */
requirements. */
#undef DEFAULT_STRUCTURE_SIZE_BOUNDARY
#define DEFAULT_STRUCTURE_SIZE_BOUNDARY 8
/* Emit code to set up a trampoline and synchronise 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) \
{ \
extern int sysarch(int number, void *args); \
struct { \
unsigned int addr; \
int len; \
} s; \
s.addr = (unsigned int)(BEG); \
s.len = (END) - (BEG); \
(void)sysarch(0, &s); \
}