diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2007-03-08 11:06:41 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@gcc.gnu.org> | 2007-03-08 11:06:41 +0000 |
commit | 8b9cf39ead77e1ce8683f57e4416b196c58f5c10 (patch) | |
tree | b592b37e724ff1196d0b6c3ec8438f049158ed0a /libffi | |
parent | 068c623d02d839451272da894912b6ac6e42d85c (diff) | |
download | gcc-8b9cf39ead77e1ce8683f57e4416b196c58f5c10.zip gcc-8b9cf39ead77e1ce8683f57e4416b196c58f5c10.tar.gz gcc-8b9cf39ead77e1ce8683f57e4416b196c58f5c10.tar.bz2 |
ffi.c (flush_icache): Fix left-over from previous patch.
* src/powerpc/ffi.c (flush_icache): Fix left-over from previous
patch.
(ffi_prep_closure_loc): Remove unneeded casts. Add needed ones.
From-SVN: r122692
Diffstat (limited to 'libffi')
-rw-r--r-- | libffi/ChangeLog | 6 | ||||
-rw-r--r-- | libffi/src/powerpc/ffi.c | 13 |
2 files changed, 11 insertions, 8 deletions
diff --git a/libffi/ChangeLog b/libffi/ChangeLog index 7118b67..ecd75cf 100644 --- a/libffi/ChangeLog +++ b/libffi/ChangeLog @@ -1,3 +1,9 @@ +2007-03-08 Alexandre Oliva <aoliva@redhat.com> + + * src/powerpc/ffi.c (flush_icache): Fix left-over from previous + patch. + (ffi_prep_closure_loc): Remove unneeded casts. Add needed ones. + 2007-03-07 Alexandre Oliva <aoliva@redhat.com> * include/ffi.h.in (ffi_closure_alloc, ffi_closure_free): New. diff --git a/libffi/src/powerpc/ffi.c b/libffi/src/powerpc/ffi.c index 8c30c64..fe5550d 100644 --- a/libffi/src/powerpc/ffi.c +++ b/libffi/src/powerpc/ffi.c @@ -839,11 +839,8 @@ flush_icache (char *wraddr, char *xaddr, int size) { int i; for (i = 0; i < size; i += MIN_CACHE_LINE_SIZE) - { - addr = addr1 + i; - __asm__ volatile ("icbi 0,%0;" "dcbf 0,%1;" - : : "r" (xaddr + i), "r" (wraddr + i) : "memory"); - } + __asm__ volatile ("icbi 0,%0;" "dcbf 0,%1;" + : : "r" (xaddr + i), "r" (wraddr + i) : "memory"); __asm__ volatile ("icbi 0,%0;" "dcbf 0,%1;" "sync;" "isync;" : : "r"(xaddr + size - 1), "r"(wraddr + size - 1) : "memory"); @@ -863,7 +860,7 @@ ffi_prep_closure_loc (ffi_closure *closure, FFI_ASSERT (cif->abi == FFI_LINUX64); /* Copy function address and TOC from ffi_closure_LINUX64. */ memcpy (tramp, (char *) ffi_closure_LINUX64, 16); - tramp[2] = (void *) codeloc; + tramp[2] = codeloc; #else unsigned int *tramp; @@ -879,10 +876,10 @@ ffi_prep_closure_loc (ffi_closure *closure, tramp[8] = 0x7c0903a6; /* mtctr r0 */ tramp[9] = 0x4e800420; /* bctr */ *(void **) &tramp[2] = (void *) ffi_closure_SYSV; /* function */ - *(void **) &tramp[3] = (void *) codeloc; /* context */ + *(void **) &tramp[3] = codeloc; /* context */ /* Flush the icache. */ - flush_icache (tramp, codeloc, FFI_TRAMPOLINE_SIZE); + flush_icache ((char *)tramp, (char *)codeloc, FFI_TRAMPOLINE_SIZE); #endif closure->cif = cif; |