search for: getcurrentpcvalue

Displaying 20 results from an estimated 20 matches for "getcurrentpcvalue".

2008 Feb 04
0
[LLVMdev] Exception handling in JIT
...ocateMemForFunction(Function *F) { > MemMgr->deallocateMemForFunction(F); > } > + > + virtual void emitLabel(uint64_t LabelID) { > + if (LabelLocations.size() <= LabelID) > + LabelLocations.resize((LabelID+1)*2); > + LabelLocations[LabelID] = getCurrentPCValue(); > + } > + > + virtual intptr_t getLabelAddress(uint64_t LabelID) const { > + assert(LabelLocations.size() > (unsigned)LabelID && > + LabelLocations[LabelID] && "Label not emitted!"); > + return LabelLocations[LabelID]; &g...
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:
2009 Jul 09
0
[LLVMdev] Source file information.
>Aaron Gray wrote: >> What I am after is to be able to emit line number information for COFF >> (Common Object File Format) object module files, basically it comes down >> to >> paired line numbers and virtual address offsets. >> >> I have not really set out to look at this yet, just feeling ahead, and >> was >> prompted by Saman's question
2007 Dec 11
0
[LLVMdev] Exception handling in JIT
...achineCodeEmitter() {} > > @@ -158,6 +161,9 @@ > /// start of the block is, and can implement > getMachineBasicBlockAddress. > virtual void StartMachineBasicBlock(MachineBasicBlock *MBB) = 0; > > + virtual void EmitLabel(uint64_t LabelID) = 0; > + > + > /// getCurrentPCValue - This returns the address that the next > emitted byte > /// will be output to. > /// > @@ -193,6 +199,10 @@ > /// emitted. > /// > virtual intptr_t getMachineBasicBlockAddress(MachineBasicBlock > *MBB) const= 0; > + > + virtual intptr_t getLabelAd...
2007 Dec 12
3
[LLVMdev] Exception handling in JIT
...@@ -158,6 +161,9 @@ >> /// start of the block is, and can implement >> getMachineBasicBlockAddress. >> virtual void StartMachineBasicBlock(MachineBasicBlock *MBB) = 0; >> >> + virtual void EmitLabel(uint64_t LabelID) = 0; >> + >> + >> /// getCurrentPCValue - This returns the address that the next >> emitted byte >> /// will be output to. >> /// >> @@ -193,6 +199,10 @@ >> /// emitted. >> /// >> virtual intptr_t getMachineBasicBlockAddress(MachineBasicBlock >> *MBB) const= 0; >> +...
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
2009 Jul 09
3
[LLVMdev] Source file information.
Aaron Gray wrote: > Dear All, > > To add to this, what you want to do is find the appropriate debug stop > point intrinsic and then use it to look up the information for that > instruction. > > Here is some sample code from SAFECode that finds the debug information > associated with a CallInst (LLVM call instruction) held in the variable > CI. It uses the
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 --------------
2013 Aug 22
0
[LLVMdev] [RFC PATCH] X32 ABI support for Clang/compiler-rt (Clang patch)
...JITCodeEmitter &JCE) { -#if defined (X86_64_JIT) +#if defined (X86_64_JIT) && defined (__LP64__) const unsigned Alignment = 8; uint8_t Buffer[8]; uint8_t *Cur = Buffer; @@ -481,7 +487,7 @@ JCE.emitAlignment(4); void *Result = (void*)JCE.getCurrentPCValue(); if (NotCC) { -#if defined (X86_64_JIT) +#if defined (X86_64_JIT) && defined (__LP64__) JCE.emitByte(0x49); // REX prefix JCE.emitByte(0xB8+2); // movabsq r10 JCE.emitWordLE((unsigned)(intptr_t)Target); @@ -496,7 +502,7 @@ return Result; } -#if...
2008 Apr 01
2
[LLVMdev] Being able to know the jitted code-size before emitting
...; (uintptr_t)FnStart); >> #endif >> + >> if (ExceptionHandling) { >> uintptr_t ActualSize; >> + if (SizedMemoryCode) { >> + SizeEmitter sz(LabelLocations); >> + DE->EmitDwarfTable(F, sz, FnStart, FnEnd); >> + ActualSize = sz.getCurrentPCValue(); >> + } >> SavedBufferBegin = BufferBegin; >> SavedBufferEnd = BufferEnd; >> SavedCurBufferPtr = CurBufferPtr; >> - >> + >> BufferBegin = CurBufferPtr = MemMgr- >> >>> startExceptionTable(F.getFunction(), >>&g...
2008 Mar 31
0
[LLVMdev] Being able to know the jitted code-size before emitting
...er(FnStart, FnEnd-FnStart, > (uintptr_t)FnStart); > #endif > + > if (ExceptionHandling) { > uintptr_t ActualSize; > + if (SizedMemoryCode) { > + SizeEmitter sz(LabelLocations); > + DE->EmitDwarfTable(F, sz, FnStart, FnEnd); > + ActualSize = sz.getCurrentPCValue(); > + } > SavedBufferBegin = BufferBegin; > SavedBufferEnd = BufferEnd; > SavedCurBufferPtr = CurBufferPtr; > - > + > BufferBegin = CurBufferPtr = MemMgr- > >startExceptionTable(F.getFunction(), >...
2008 Apr 01
0
[LLVMdev] Being able to know the jitted code-size before emitting
...;> #endif >>> + >>> if (ExceptionHandling) { >>> uintptr_t ActualSize; >>> + if (SizedMemoryCode) { >>> + SizeEmitter sz(LabelLocations); >>> + DE->EmitDwarfTable(F, sz, FnStart, FnEnd); >>> + ActualSize = sz.getCurrentPCValue(); >>> + } >>> SavedBufferBegin = BufferBegin; >>> SavedBufferEnd = BufferEnd; >>> SavedCurBufferPtr = CurBufferPtr; >>> - >>> + >>> BufferBegin = CurBufferPtr = MemMgr- >>> >>>> startExceptionTable(F...
2008 Apr 04
3
[LLVMdev] Being able to know the jitted code-size before emitting
...; + >>>> if (ExceptionHandling) { >>>> uintptr_t ActualSize; >>>> + if (SizedMemoryCode) { >>>> + SizeEmitter sz(LabelLocations); >>>> + DE->EmitDwarfTable(F, sz, FnStart, FnEnd); >>>> + ActualSize = sz.getCurrentPCValue(); >>>> + } >>>> SavedBufferBegin = BufferBegin; >>>> SavedBufferEnd = BufferEnd; >>>> SavedCurBufferPtr = CurBufferPtr; >>>> - >>>> + >>>> BufferBegin = CurBufferPtr = MemMgr- >>>> >&g...
2013 Aug 22
7
[LLVMdev] [RFC PATCH] X32 ABI support for Clang/compiler-rt
Hi, I'm working on bringing up complete coverage for a Gentoo x32 "desktop" system. I've been cooking up quite a few patches for various packages to push upstream, but right now, the biggest blocker is the lack of support for building with/codegen targeting x32 in llvm/clang. Since the x32 patches were sent last year, I see support code has landed in LLVM, and basic handling of
2008 Apr 05
2
[LLVMdev] Being able to know the jitted code-size before emitting
...ling) { >>>>>> uintptr_t ActualSize; >>>>>> + if (SizedMemoryCode) { >>>>>> + SizeEmitter sz(LabelLocations); >>>>>> + DE->EmitDwarfTable(F, sz, FnStart, FnEnd); >>>>>> + ActualSize = sz.getCurrentPCValue(); >>>>>> + } >>>>>> SavedBufferBegin = BufferBegin; >>>>>> SavedBufferEnd = BufferEnd; >>>>>> SavedCurBufferPtr = CurBufferPtr; >>>>>> - >>>>>> + >>>>>> BufferBe...
2013 Aug 22
3
[LLVMdev] [NEW PATCH] X32 ABI support for Clang/compiler-rt (Clang patch)
...JITCodeEmitter &JCE) { -#if defined (X86_64_JIT) +#if defined (X86_64_JIT) && defined (__LP64__) const unsigned Alignment = 8; uint8_t Buffer[8]; uint8_t *Cur = Buffer; @@ -481,7 +487,7 @@ JCE.emitAlignment(4); void *Result = (void*)JCE.getCurrentPCValue(); if (NotCC) { -#if defined (X86_64_JIT) +#if defined (X86_64_JIT) && defined (__LP64__) JCE.emitByte(0x49); // REX prefix JCE.emitByte(0xB8+2); // movabsq r10 JCE.emitWordLE((unsigned)(intptr_t)Target); @@ -496,7 +502,7 @@ return Result; } -#if...
2008 Apr 05
0
[LLVMdev] Being able to know the jitted code-size before emitting
...;>>>> uintptr_t ActualSize; >>>>>>> + if (SizedMemoryCode) { >>>>>>> + SizeEmitter sz(LabelLocations); >>>>>>> + DE->EmitDwarfTable(F, sz, FnStart, FnEnd); >>>>>>> + ActualSize = sz.getCurrentPCValue(); >>>>>>> + } >>>>>>> SavedBufferBegin = BufferBegin; >>>>>>> SavedBufferEnd = BufferEnd; >>>>>>> SavedCurBufferPtr = CurBufferPtr; >>>>>>> - >>>>>>> + >>>&g...
2008 Apr 04
0
[LLVMdev] Being able to know the jitted code-size before emitting
...t; if (ExceptionHandling) { >>>>> uintptr_t ActualSize; >>>>> + if (SizedMemoryCode) { >>>>> + SizeEmitter sz(LabelLocations); >>>>> + DE->EmitDwarfTable(F, sz, FnStart, FnEnd); >>>>> + ActualSize = sz.getCurrentPCValue(); >>>>> + } >>>>> SavedBufferBegin = BufferBegin; >>>>> SavedBufferEnd = BufferEnd; >>>>> SavedCurBufferPtr = CurBufferPtr; >>>>> - >>>>> + >>>>> BufferBegin = CurBufferPtr = MemMgr-...
2008 Apr 07
2
[LLVMdev] Being able to know the jitted code-size before emitting
...; uintptr_t ActualSize; >>>>>>>> + if (SizedMemoryCode) { >>>>>>>> + SizeEmitter sz(LabelLocations); >>>>>>>> + DE->EmitDwarfTable(F, sz, FnStart, FnEnd); >>>>>>>> + ActualSize = sz.getCurrentPCValue(); >>>>>>>> + } >>>>>>>> SavedBufferBegin = BufferBegin; >>>>>>>> SavedBufferEnd = BufferEnd; >>>>>>>> SavedCurBufferPtr = CurBufferPtr; >>>>>>>> - >>>>>>&...
2008 Apr 07
0
[LLVMdev] Being able to know the jitted code-size before emitting
...ualSize; >>>>>>>>> + if (SizedMemoryCode) { >>>>>>>>> + SizeEmitter sz(LabelLocations); >>>>>>>>> + DE->EmitDwarfTable(F, sz, FnStart, FnEnd); >>>>>>>>> + ActualSize = sz.getCurrentPCValue(); >>>>>>>>> + } >>>>>>>>> SavedBufferBegin = BufferBegin; >>>>>>>>> SavedBufferEnd = BufferEnd; >>>>>>>>> SavedCurBufferPtr = CurBufferPtr; >>>>>>>>> - >>...