diff options
author | Krister Walfridsson <cato@df.lth.se> | 2002-09-08 18:06:18 +0200 |
---|---|---|
committer | Krister Walfridsson <kristerw@gcc.gnu.org> | 2002-09-08 16:06:18 +0000 |
commit | e2f97e264e2e7806c47e31e3f8048d66d7b8623c (patch) | |
tree | d838ecbeca067721e56611eb4c15aa431390ce3d /gcc | |
parent | f69257d6afd477bd75de85db1019a0c10115b6df (diff) | |
download | gcc-e2f97e264e2e7806c47e31e3f8048d66d7b8623c.zip gcc-e2f97e264e2e7806c47e31e3f8048d66d7b8623c.tar.gz gcc-e2f97e264e2e7806c47e31e3f8048d66d7b8623c.tar.bz2 |
netbsd.h (INITIALIZE_TRAMPOLINE): Redefine.
* config/arm/netbsd.h (INITIALIZE_TRAMPOLINE): Redefine.
(CLEAR_INSN_CACHE): Define.
From-SVN: r56954
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/arm/netbsd.h | 27 |
2 files changed, 32 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 97747a2..8dc77e2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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. diff --git a/gcc/config/arm/netbsd.h b/gcc/config/arm/netbsd.h index 5a080d3..e558267 100644 --- a/gcc/config/arm/netbsd.h +++ b/gcc/config/arm/netbsd.h @@ -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); \ +} |