search for: fnend

Displaying 20 results from an estimated 40 matches for "fnend".

2012 Sep 24
0
[LLVMdev] [llvm-commits] Fwd: Re: [PATCH] Fix for bug in JIT exception table allocation
...ActualSize); > > > > - BufferEnd = BufferBegin+ActualSize; > > > > - EmittedFunctions[F.getFunction()].ExceptionTable = BufferBegin; > > > > - uint8_t *EhStart; > > > > - uint8_t *FrameRegister = DE->EmitDwarfTable(F, *this, FnStart, FnEnd, > > > > - EhStart); > > > > + while (true) { > > > > + BufferBegin = CurBufferPtr = > > > > MemMgr->startExceptionTable(F.getFunction(), > > > > + > > > > ActualSize);...
2009 Jul 03
0
[LLVMdev] Question about memory allocation in JIT
...ppings.  Also, we should clear ConstPoolAddresses.  There are only two changes in function JITEmitter::finishFunction: > > > --- lib/ExecutionEngine/JIT/JITEmitter.cpp      (original patch) > +++ lib/ExecutionEngine/JIT/JITEmitter.cpp      (my changes) > @@ -946,6 +947,7 @@ >   // FnEnd is the end of the function's machine code. >   uint8_t *FnEnd = CurBufferPtr; > > +  std::vector<MachineRelocation> BackupRelocations = Relocations; >   if (!Relocations.empty()) { >     CurFn = F.getFunction(); >     NumRelos += Relocations.size(); > @@ -1028,8 +1030...
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
...s_icache_invalidate(Addr, len); -#endif -} - /// getFunctionStub - This returns a pointer to a function stub, creating /// one on demand as needed. void *JITResolver::getFunctionStub(Function *F) { @@ -756,7 +742,7 @@ } // Invalidate the icache if necessary. - synchronizeICache(FnStart, FnEnd-FnStart); + TheJIT->getJITInfo().InvalidateInstructionCache(FnStart, FnEnd-FnStart); // Add it to the JIT symbol table if the host wants it. AddFunctionToSymbolTable(F.getFunction()->getNameStart(),
2015 Dec 30
2
Substitute instruction with a jump to a library code
...ed .eabi_attribute 25, 1 @ Tag_ABI_align_preserved .file "simple-fadd.ll" .globl fadd .align 2 .type fadd,%function fadd: @ @fadd .fnstart .Leh_func_begin0: @ BB#0: push {lr} bl __addsf3 pop {lr} mov pc, lr .Ltmp0: .size fadd, .Ltmp0-fadd .Leh_func_end0: .fnend .ident "Ubuntu clang version 3.6.0-2ubuntu1~trusty1 (tags/RELEASE_360/final) (based on LLVM 3.6.0)" One can clearly see a bl __addsf3 instruction. However for some reason my target produces a lf.add.s (which is a floating point add) instead of branching to a library code. Clearly I'...
2012 Aug 21
2
[LLVMdev] [PATCH] Fix for bug in JIT exception table allocation (no test yet)
...ble(F.getFunction(), - ActualSize); - BufferEnd = BufferBegin+ActualSize; - EmittedFunctions[F.getFunction()].ExceptionTable = BufferBegin; - uint8_t *EhStart; - uint8_t *FrameRegister = DE->EmitDwarfTable(F, *this, FnStart, FnEnd, - EhStart); + while (true) { + BufferBegin = CurBufferPtr = MemMgr->startExceptionTable(F.getFunction(), + ActualSize); + BufferEnd = BufferBegin+ActualSize; + EmittedFu...
2014 Feb 06
7
[LLVMdev] Unwind behaviour in Clang/LLVM
...ting the tables on anything that could potentially interact with exceptional code makes sense, but that's clearly a front-end decision. To LLVM, nounwind and uwtables should be absolute: IF (uwtables) IF (nownwind) CantUnwind ELSE Unwind Table ELSE do nothing ENDIF 2. .fnstart/.fnend+friends Another problem is that the emission of unwinding tables (based on .fnstart/.fnend symbols and others) is conditional *only* to the existence (or not) of an exception handling class being loaded (EHABI, Dwarf). Which means that, we can't disable the EH on a per-function basis. We'...
2014 Feb 06
0
[LLVMdev] Unwind behaviour in Clang/LLVM
...s clearly a front-end decision. > To LLVM, nounwind and uwtables should be absolute: > IF (uwtables) > IF (nownwind) > CantUnwind > ELSE > Unwind Table > ELSE > do nothing > ENDIF This certainly appears to me a sensible sequence of decision. > 2. .fnstart/.fnend+friends > > Another problem is that the emission of unwinding tables (based on > .fnstart/.fnend symbols and others) is conditional *only* to the existence > (or not) of an exception handling class being loaded (EHABI, Dwarf). Which > means that, we can't disable the EH on a per-...
2009 Jul 01
3
[LLVMdev] Question about memory allocation in JIT
Hello! Working with LLVM JIT-compiler I found a small bug and I'd like to correct it. Namely, on some tests LLVM fails with message "JIT: Ran out of space for generated machine code!" This error emerges because the test creates big static array. Global variables are placed into memory block for function, that is first seen using given variable. Besides, during memory allocation
2012 Aug 22
1
[LLVMdev] [PATCH] Fix for bug in JIT exception table allocation (no test yet)
On Aug 21, 2012, at 2:12 PM, Michael Muller <mmuller at enduden.com> wrote: > > Hi, I found a bug in the code that generates exception tables, I've attached > what I think is the correct fix. > > When you run out of space writing to a buffer, the buffer management code > simply stops writing at the end of the buffer. It is the responsibility of > the caller to
2007 Dec 11
0
[LLVMdev] Exception handling in JIT
...w has > occurred, this method > + /// returns true (the callee is required to try again), > otherwise it returns > + /// false. > + /// > + virtual bool finishFunction(MachineFunction &F, unsigned char* > FnStart, > + unsigned char* FnEnd) = 0; > + > + /// EmitInt8 - This callback is invoked when a byte needs to be > written to the > + /// output stream. > + /// > + void EmitInt8(unsigned char B, bool print=true) { > +// if (print) printf(".byte 0x%x\n", B); > + if (CurBufferPtr != Buffe...
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
2012 Aug 23
0
[LLVMdev] [PATCH] Fix for bug in JIT exception table allocation (no test yet)
Eric Christopher wrote: > > On Aug 21, 2012, at 2:12 PM, Michael Muller <mmuller at enduden.com> wrote: > > > > > Hi, I found a bug in the code that generates exception tables, I've attached > > what I think is the correct fix. > > > > When you run out of space writing to a buffer, the buffer management code > > simply stops writing at the
2017 May 02
4
[ARM/Thumb] Make a function in arm while in Thumb triple
Hi, I wanted to know if it was possible to force ARM backend to compile a function in ARM while the rest is in Thumb mode. I tried the attributes which is used in GCC but it doesn't work. Here is what I tried: https://pastebin.com/jCr5LPUY Thanks in advance, Uvekilledkenny -------------- next part -------------- An HTML attachment was scrubbed... URL:
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
...t;> + } >> + >> + >> TheJIT->updateGlobalMapping(F.getFunction(), CurBufferPtr); >> >> MBBLocations.clear(); >> @@ -579,12 +614,18 @@ >> DOUT << "Disassembled code:\n" >> << sys::disassembleBuffer(FnStart, FnEnd-FnStart, >> (uintptr_t)FnStart); >> #endif >> + >> if (ExceptionHandling) { >> uintptr_t ActualSize; >> + if (SizedMemoryCode) { >> + SizeEmitter sz(LabelLocations); >> + DE->EmitDwarfTable(F, sz, FnStart, FnEnd); >> +...
2008 Mar 31
0
[LLVMdev] Being able to know the jitted code-size before emitting
...->getAlignment(), 8U)); > + > + } > + > + > TheJIT->updateGlobalMapping(F.getFunction(), CurBufferPtr); > > MBBLocations.clear(); > @@ -579,12 +614,18 @@ > DOUT << "Disassembled code:\n" > << sys::disassembleBuffer(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...
2008 Apr 01
0
[LLVMdev] Being able to know the jitted code-size before emitting
...gt;>> + >>> TheJIT->updateGlobalMapping(F.getFunction(), CurBufferPtr); >>> >>> MBBLocations.clear(); >>> @@ -579,12 +614,18 @@ >>> DOUT << "Disassembled code:\n" >>> << sys::disassembleBuffer(FnStart, FnEnd-FnStart, >>> (uintptr_t)FnStart); >>> #endif >>> + >>> if (ExceptionHandling) { >>> uintptr_t ActualSize; >>> + if (SizedMemoryCode) { >>> + SizeEmitter sz(LabelLocations); >>> + DE->EmitDwarfTable(F, sz, Fn...
2010 May 19
0
[LLVMdev] ARM EABI Exceptions
Hello, Renato > Are you actively working in that area? No, I started to experiment with ARM EH ~year ago, but never had anything complete, unfortunately > My main concern is that DwarfException is not extensible at all. I can't inherit from it (DwarfWriter creates it directly) and there are no call backs to target-specific code (nor registration of such mechanism). Why do you need