search for: sys_icache_invalid

Displaying 5 results from an estimated 5 matches for "sys_icache_invalid".

2008 Jun 16
0
[LLVMdev] PowerPC instruction cache invalidation
On Mon, 16 Jun 2008, Gary Benson wrote: > When you genetate code on PowerPC you need to explicitly invalidate > the instruction cache to force the processor to reread it. In LLVM > there is code to do this for function stubs on Macintosh, but not > for other platforms and not for JITted code generally. Applied, thanks!
2008 Jun 17
1
[LLVMdev] PowerPC instruction cache invalidation
...er.cpp =================================================================== --- lib/Target/PowerPC/PPCCodeEmitter.cpp (revision 52391) +++ lib/Target/PowerPC/PPCCodeEmitter.cpp (working copy) @@ -80,10 +80,6 @@ return new PPCCodeEmitter(TM, MCE); } -#ifdef __APPLE__ -extern "C" void sys_icache_invalidate(const void *Addr, size_t len); -#endif - bool PPCCodeEmitter::runOnMachineFunction(MachineFunction &MF) { assert((MF.getTarget().getRelocationModel() != Reloc::Default || MF.getTarget().getRelocationModel() != Reloc::Static) && Index: lib/Target/PowerPC/PPCJITInfo.h ==...
2008 Jun 16
6
[LLVMdev] PowerPC instruction cache invalidation
.../gbenson.net/ -------------- next part -------------- --- lib/Target/PowerPC/PPCJITInfo.cpp.orig 2008-06-11 07:12:39 +++ lib/Target/PowerPC/PPCJITInfo.cpp 2008-06-16 08:42:25 @@ -336,6 +336,20 @@ #if (defined(__POWERPC__) || defined (__ppc__) || defined(_POWER)) && \ defined(__APPLE__) sys_icache_invalidate(Addr, len); +#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; + + for (intptr_t Line = StartLine; Line &...
2010 Mar 07
0
[LLVMdev] llvm and flushing instruction cache
On Sat, Mar 6, 2010 at 10:34 PM, Shasank Chavan <shanko_chavano at hotmail.com> wrote: > Hi.  I have a very quick question.  Is the instruction cache flushed by the > llvm jit before code in memory is written to or executed?  I'm assuming so, > but I can't find where in the source code this is happening.  In particular > I searched for clflush, invd, and wbinvd
2010 Mar 07
4
[LLVMdev] llvm and flushing instruction cache
Hi. I have a very quick question. Is the instruction cache flushed by the llvm jit before code in memory is written to or executed? I'm assuming so, but I can't find where in the source code this is happening. In particular I searched for clflush, invd, and wbinvd instructions, but couldn't find them. And if it's not necessary to do this, can you please explain why? (I'm