summaryrefslogtreecommitdiff
path: root/libffi
diff options
context:
space:
mode:
authoraph <aph@138bc75d-0d04-0410-961f-82ee72b054a4>2011-07-11 17:50:04 +0000
committeraph <aph@138bc75d-0d04-0410-961f-82ee72b054a4>2011-07-11 17:50:04 +0000
commita30be784f0d886795812def701ded7ff04866f46 (patch)
tree93bc1f6b304a1edd1c502f2bd9d82ce03e22ae43 /libffi
parent739fa2708de57ed79f4d662d5d3e21933c35020c (diff)
downloadgcc-a30be784f0d886795812def701ded7ff04866f46.tar.gz
2011-07-11 Andrew Haley <aph@redhat.com>
* src/arm/ffi.c (FFI_INIT_TRAMPOLINE): Clear icache. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176172 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libffi')
-rw-r--r--libffi/ChangeLog4
-rw-r--r--libffi/src/arm/ffi.c6
2 files changed, 9 insertions, 1 deletions
diff --git a/libffi/ChangeLog b/libffi/ChangeLog
index 12afae61ee6..1bbcf9e47f4 100644
--- a/libffi/ChangeLog
+++ b/libffi/ChangeLog
@@ -1,3 +1,7 @@
+2011-07-11 Andrew Haley <aph@redhat.com>
+
+ * src/arm/ffi.c (FFI_INIT_TRAMPOLINE): Clear icache.
+
2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* testsuite/libffi.call/cls_double_va.c: Move PR number to comment.
diff --git a/libffi/src/arm/ffi.c b/libffi/src/arm/ffi.c
index 9a0a53c83a9..4e72c3bcd7a 100644
--- a/libffi/src/arm/ffi.c
+++ b/libffi/src/arm/ffi.c
@@ -341,12 +341,16 @@ ffi_prep_incoming_args_SYSV(char *stack, void **rvalue,
({ unsigned char *__tramp = (unsigned char*)(TRAMP); \
unsigned int __fun = (unsigned int)(FUN); \
unsigned int __ctx = (unsigned int)(CTX); \
+ unsigned char *insns = (unsigned char *)(CTX); \
*(unsigned int*) &__tramp[0] = 0xe92d000f; /* stmfd sp!, {r0-r3} */ \
*(unsigned int*) &__tramp[4] = 0xe59f0000; /* ldr r0, [pc] */ \
*(unsigned int*) &__tramp[8] = 0xe59ff000; /* ldr pc, [pc] */ \
*(unsigned int*) &__tramp[12] = __ctx; \
*(unsigned int*) &__tramp[16] = __fun; \
- __clear_cache((&__tramp[0]), (&__tramp[19])); \
+ __clear_cache((&__tramp[0]), (&__tramp[19])); /* Clear data mapping. */ \
+ __clear_cache(insns, insns + 3 * sizeof (unsigned int)); \
+ /* Clear instruction \
+ mapping. */ \
})