mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-19 04:31:17 +00:00
Unbreak non-PPC builds
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52419 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
210539ebc4
commit
7a17ff7b3f
@ -331,12 +331,12 @@ extern "C" void sys_icache_invalidate(const void *Addr, size_t len);
|
||||
#endif
|
||||
|
||||
void PPCJITInfo::InvalidateInstructionCache(const void *Addr, unsigned len) {
|
||||
#if (defined(__POWERPC__) || defined (__ppc__) || defined(_POWER)) && \
|
||||
defined(__APPLE__)
|
||||
#if (defined(__POWERPC__) || defined (__ppc__) || defined(_POWER))
|
||||
# if defined(__APPLE__)
|
||||
sys_icache_invalidate(Addr, len);
|
||||
#elif defined(__GNUC__)
|
||||
# elif defined(__GNUC__)
|
||||
const size_t LineSize = 32;
|
||||
|
||||
|
||||
const intptr_t Mask = ~(LineSize - 1);
|
||||
const intptr_t StartLine = ((intptr_t) Addr) & Mask;
|
||||
const intptr_t EndLine = ((intptr_t) Addr + len + LineSize - 1) & Mask;
|
||||
@ -348,6 +348,7 @@ defined(__APPLE__)
|
||||
for (intptr_t Line = StartLine; Line < EndLine; Line += LineSize)
|
||||
asm volatile("icbi 0, %0" : : "r"(Line));
|
||||
asm volatile("isync");
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user