aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1993-05-17 17:46:45 +0000
committerRichard Stallman <rms@gnu.org>1993-05-17 17:46:45 +0000
commitafcc28b2f12eef886df971bee0adc62f284655e7 (patch)
treeddd0a59274c3d75972a0b9218f8056a926f4fe35 /gcc
parenta144eb959b27ae60f99129c74cf643844a65bf79 (diff)
downloadgcc-afcc28b2f12eef886df971bee0adc62f284655e7.zip
gcc-afcc28b2f12eef886df971bee0adc62f284655e7.tar.gz
gcc-afcc28b2f12eef886df971bee0adc62f284655e7.tar.bz2
(INITIALIZE_TRAMPOLINE): Pass both the starting and ending
addresses of the trampoline to the cacheflush pattern. From-SVN: r4484
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/pa/pa.h24
1 files changed, 15 insertions, 9 deletions
diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h
index 84ebc37..ef9e305 100644
--- a/gcc/config/pa/pa.h
+++ b/gcc/config/pa/pa.h
@@ -979,8 +979,13 @@ extern union tree_node *current_function_decl;
}
/* Length in units of the trampoline for entering a nested function.
- If this grows to > 32 bytes, then you must update the flushcache
- pattern in pa.md. */
+
+ Flush the cache entries corresponding to the first and last addresses
+ of the trampoline. This is necessary as the trampoline may cross two
+ cache lines.
+
+ If the trampoline ever grows to > 32 bytes, then it will become
+ necessary to hack on the cacheflush pattern in pa.md. */
#define TRAMPOLINE_SIZE (5 * 4)
@@ -993,16 +998,17 @@ extern union tree_node *current_function_decl;
#define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \
{ \
- rtx addr, mem; \
+ rtx start_addr, end_addr, mem; \
\
- addr = memory_address (Pmode, plus_constant ((TRAMP), 12)); \
- emit_move_insn (gen_rtx (MEM, Pmode, addr), (FNADDR)); \
- addr = memory_address (Pmode, plus_constant ((TRAMP), 16)); \
- emit_move_insn (gen_rtx (MEM, Pmode, addr), (CXT)); \
+ start_addr = memory_address (Pmode, plus_constant ((TRAMP), 12));\
+ emit_move_insn (gen_rtx (MEM, Pmode, start_addr), (FNADDR)); \
+ start_addr = memory_address (Pmode, plus_constant ((TRAMP), 16));\
+ emit_move_insn (gen_rtx (MEM, Pmode, start_addr), (CXT)); \
/* fdc and fic only use registers for the address to flush, \
they do not accept integer displacements. */ \
- addr = force_reg (SImode, (TRAMP)); \
- emit_insn (gen_cacheflush (addr)); \
+ start_addr = force_reg (SImode, (TRAMP)); \
+ end_addr = force_reg (SImode, plus_constant (start_addr, TRAMPOLINE_SIZE));\
+ emit_insn (gen_cacheflush (start_addr, end_addr)); \
}
/* Emit code for a call to builtin_saveregs. We must emit USE insns which