search for: emitwordbe

Displaying 18 results from an estimated 18 matches for "emitwordbe".

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
...#elif defined(__GNUC__) const size_t LineSize = 32; @@ -352,8 +349,6 @@ asm volatile("icbi 0, %0" : : "r"(Line)); asm volatile("isync"); #endif - -#endif } void *PPCJITInfo::emitFunctionStub(const Function* F, void *Fn, @@ -372,7 +367,7 @@ MCE.emitWordBE(0); MCE.emitWordBE(0); EmitBranchToAt(Addr, (intptr_t)Fn, false, is64Bit); - SyncICache((void*)Addr, 7*4); + InvalidateInstructionCache((void*)Addr, 7*4); return MCE.finishFunctionStub(F); } @@ -400,7 +395,7 @@ MCE.emitWordBE(0); MCE.emitWordBE(0); EmitBranchToAt(...
2008 Mar 30
3
[LLVMdev] Being able to know the jitted code-size before emitting
Hi everyone, vmkit requires to know the size of a jitted method before emitting the method. This allows to allocate the correct size for the method. The attached patch creates this functionality when the flag SizedMemoryCode is on. In order to implement this functionality, i had to virtualize some MachineCodeEmitter functions. Is it OK to commit the patch? Thanks, Nicolas --------------
2008 Jun 16
6
[LLVMdev] PowerPC instruction cache invalidation
Hi all, 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. The attached patch adds support for GNU platforms, but I can't figure out a nice way to call it for all generated code. Can
2008 Apr 01
2
[LLVMdev] Being able to know the jitted code-size before emitting
...; } >> + virtual void addRelocation(const llvm::MachineRelocation&) { } >> + virtual void emitByte(unsigned char B) { >> + CurBufferPtr++; >> + } >> + virtual void emitWordLE(unsigned W) { >> + CurBufferPtr+=4; >> + } >> + virtual void emitWordBE(unsigned W) { >> + CurBufferPtr+=4; >> + } >> + virtual void emitInt32(int Value) { >> + CurBufferPtr += 4; >> + } >> + virtual void emitInt64(uint64_t Value) { >> + CurBufferPtr += 8; >> + } >> + virtual void emitAt(uintptr_t *Ad...
2008 Mar 31
0
[LLVMdev] Being able to know the jitted code-size before emitting
...ub(const Function *F) { return 0; } > + virtual void addRelocation(const llvm::MachineRelocation&) { } > + virtual void emitByte(unsigned char B) { > + CurBufferPtr++; > + } > + virtual void emitWordLE(unsigned W) { > + CurBufferPtr+=4; > + } > + virtual void emitWordBE(unsigned W) { > + CurBufferPtr+=4; > + } > + virtual void emitInt32(int Value) { > + CurBufferPtr += 4; > + } > + virtual void emitInt64(uint64_t Value) { > + CurBufferPtr += 8; > + } > + virtual void emitAt(uintptr_t *Addr, uintptr_t Value) { > + } &gt...
2008 Apr 01
0
[LLVMdev] Being able to know the jitted code-size before emitting
...addRelocation(const llvm::MachineRelocation&) { } >>> + virtual void emitByte(unsigned char B) { >>> + CurBufferPtr++; >>> + } >>> + virtual void emitWordLE(unsigned W) { >>> + CurBufferPtr+=4; >>> + } >>> + virtual void emitWordBE(unsigned W) { >>> + CurBufferPtr+=4; >>> + } >>> + virtual void emitInt32(int Value) { >>> + CurBufferPtr += 4; >>> + } >>> + virtual void emitInt64(uint64_t Value) { >>> + CurBufferPtr += 8; >>> + } >>>...
2008 Apr 04
3
[LLVMdev] Being able to know the jitted code-size before emitting
...achineRelocation&) { } >>>> + virtual void emitByte(unsigned char B) { >>>> + CurBufferPtr++; >>>> + } >>>> + virtual void emitWordLE(unsigned W) { >>>> + CurBufferPtr+=4; >>>> + } >>>> + virtual void emitWordBE(unsigned W) { >>>> + CurBufferPtr+=4; >>>> + } >>>> + virtual void emitInt32(int Value) { >>>> + CurBufferPtr += 4; >>>> + } >>>> + virtual void emitInt64(uint64_t Value) { >>>> + CurBufferPtr += 8; &gt...
2008 Apr 05
2
[LLVMdev] Being able to know the jitted code-size before emitting
...irtual void emitByte(unsigned char B) { >>>>>> + CurBufferPtr++; >>>>>> + } >>>>>> + virtual void emitWordLE(unsigned W) { >>>>>> + CurBufferPtr+=4; >>>>>> + } >>>>>> + virtual void emitWordBE(unsigned W) { >>>>>> + CurBufferPtr+=4; >>>>>> + } >>>>>> + virtual void emitInt32(int Value) { >>>>>> + CurBufferPtr += 4; >>>>>> + } >>>>>> + virtual void emitInt64(uint64_t Value...
2008 Apr 05
0
[LLVMdev] Being able to know the jitted code-size before emitting
...igned char B) { >>>>>>> + CurBufferPtr++; >>>>>>> + } >>>>>>> + virtual void emitWordLE(unsigned W) { >>>>>>> + CurBufferPtr+=4; >>>>>>> + } >>>>>>> + virtual void emitWordBE(unsigned W) { >>>>>>> + CurBufferPtr+=4; >>>>>>> + } >>>>>>> + virtual void emitInt32(int Value) { >>>>>>> + CurBufferPtr += 4; >>>>>>> + } >>>>>>> + virtual void...
2008 Apr 04
0
[LLVMdev] Being able to know the jitted code-size before emitting
...gt;>>>> + virtual void emitByte(unsigned char B) { >>>>> + CurBufferPtr++; >>>>> + } >>>>> + virtual void emitWordLE(unsigned W) { >>>>> + CurBufferPtr+=4; >>>>> + } >>>>> + virtual void emitWordBE(unsigned W) { >>>>> + CurBufferPtr+=4; >>>>> + } >>>>> + virtual void emitInt32(int Value) { >>>>> + CurBufferPtr += 4; >>>>> + } >>>>> + virtual void emitInt64(uint64_t Value) { >>>>>...
2008 Apr 07
2
[LLVMdev] Being able to know the jitted code-size before emitting
...>>>>>> + CurBufferPtr++; >>>>>>>> + } >>>>>>>> + virtual void emitWordLE(unsigned W) { >>>>>>>> + CurBufferPtr+=4; >>>>>>>> + } >>>>>>>> + virtual void emitWordBE(unsigned W) { >>>>>>>> + CurBufferPtr+=4; >>>>>>>> + } >>>>>>>> + virtual void emitInt32(int Value) { >>>>>>>> + CurBufferPtr += 4; >>>>>>>> + } >>>>>>&...
2008 Apr 07
0
[LLVMdev] Being able to know the jitted code-size before emitting
...> + CurBufferPtr++; >>>>>>>>> + } >>>>>>>>> + virtual void emitWordLE(unsigned W) { >>>>>>>>> + CurBufferPtr+=4; >>>>>>>>> + } >>>>>>>>> + virtual void emitWordBE(unsigned W) { >>>>>>>>> + CurBufferPtr+=4; >>>>>>>>> + } >>>>>>>>> + virtual void emitInt32(int Value) { >>>>>>>>> + CurBufferPtr += 4; >>>>>>>>> + } >&...
2007 Dec 11
0
[LLVMdev] Exception handling in JIT
...gt; "JIT relocation model must be set to static or default!"); > + > + MCE.setModuleInfo(&getAnalysis<MachineModuleInfo>()); > do { > MovePCtoLROffset = 0; > MCE.startFunction(MF); > @@ -101,6 +108,9 @@ > default: > MCE.emitWordBE(getBinaryCodeForInstr(*I)); > break; > + case TargetInstrInfo::LABEL: > + MCE.EmitLabel(MI.getOperand(0).getImm()); > + break; > case PPC::IMPLICIT_DEF_GPRC: > case PPC::IMPLICIT_DEF_G8RC: > case PPC::IMPLICIT_DEF_F8: > Index: lib/Target/X8...
2007 Dec 12
3
[LLVMdev] Exception handling in JIT
...on model must be set to static or default!"); >> + >> + MCE.setModuleInfo(&getAnalysis<MachineModuleInfo>()); >> do { >> MovePCtoLROffset = 0; >> MCE.startFunction(MF); >> @@ -101,6 +108,9 @@ >> default: >> MCE.emitWordBE(getBinaryCodeForInstr(*I)); >> break; >> + case TargetInstrInfo::LABEL: >> + MCE.EmitLabel(MI.getOperand(0).getImm()); >> + break; >> case PPC::IMPLICIT_DEF_GPRC: >> case PPC::IMPLICIT_DEF_G8RC: >> case PPC::IMPLICIT_DEF_F...
2007 Dec 10
2
[LLVMdev] Exception handling in JIT
Hi everyone, Here's a patch that enables exception handling when jitting. I've copy/pasted _many_code from lib/Codegen/DwarfWriter.cpp, so we may need to factorize it, but the functionality is there and I'm very happy with it :) lli should now be able to execute the output from llvm-gcc when using exceptions (the UnwindInst instruction is not involved in this patch). Just add the
2008 Feb 04
0
[LLVMdev] Exception handling in JIT
...amp; > "JIT relocation model must be set to static or default!"); > + > + MCE.setModuleInfo(&getAnalysis<MachineModuleInfo>()); > do { > MovePCtoLROffset = 0; > MCE.startFunction(MF); > @@ -101,6 +109,9 @@ > default: > MCE.emitWordBE(getBinaryCodeForInstr(*I)); > break; > + case TargetInstrInfo::LABEL: > + MCE.emitLabel(MI.getOperand(0).getImm()); > + break; > case PPC::IMPLICIT_DEF_GPRC: > case PPC::IMPLICIT_DEF_G8RC: > case PPC::IMPLICIT_DEF_F8: > Index: lib/Target/X86/X8...
2008 Feb 01
2
[LLVMdev] Exception handling in JIT
Dear all, Here's a new patch with Evan's comments (thx Evan!) and some cleanups. Now the (duplicated) exception handling code is in a new file: lib/ExecutionEngine/JIT/JITDwarfEmitter. This patch should work on linux/x86 and linux/ppc (tested). Nicolas -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: jit-exceptions.patch URL: