search for: emitalign

Displaying 20 results from an estimated 27 matches for "emitalign".

Did you mean: bitalign
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 Apr 01
2
[LLVMdev] Being able to know the jitted code-size before emitting
...fo(MachineJumpTableInfo *MJTI); >> + >> + >> + virtual void startFunction(MachineFunction &F) { >> + CurBufferPtr = 0; >> + Fn = &F; >> + >> + // Ensure the constant pool/jump table info is at least 4-byte >> aligned. >> + emitAlignment(16); >> + >> + initConstantPool(F.getConstantPool()); >> + initJumpTableInfo(F.getJumpTableInfo()); >> + >> + ConstantPoolBase = (void*)(((uintptr_t) ConstantPoolBase) + >> CurBufferPtr); >> + JumpTableBase = (void*)(((uintptr_t) Jump...
2008 Mar 31
0
[LLVMdev] Being able to know the jitted code-size before emitting
...> + > + void initJumpTableInfo(MachineJumpTableInfo *MJTI); > + > + > + virtual void startFunction(MachineFunction &F) { > + CurBufferPtr = 0; > + Fn = &F; > + > + // Ensure the constant pool/jump table info is at least 4-byte > aligned. > + emitAlignment(16); > + > + initConstantPool(F.getConstantPool()); > + initJumpTableInfo(F.getJumpTableInfo()); > + > + ConstantPoolBase = (void*)(((uintptr_t) ConstantPoolBase) + > CurBufferPtr); > + JumpTableBase = (void*)(((uintptr_t) JumpTableBase) + > CurBuffe...
2008 Apr 01
0
[LLVMdev] Being able to know the jitted code-size before emitting
...t;>> + >>> + >>> + virtual void startFunction(MachineFunction &F) { >>> + CurBufferPtr = 0; >>> + Fn = &F; >>> + >>> + // Ensure the constant pool/jump table info is at least 4-byte >>> aligned. >>> + emitAlignment(16); >>> + >>> + initConstantPool(F.getConstantPool()); >>> + initJumpTableInfo(F.getJumpTableInfo()); >>> + >>> + ConstantPoolBase = (void*)(((uintptr_t) ConstantPoolBase) + >>> CurBufferPtr); >>> + JumpTableBase =...
2008 Apr 04
3
[LLVMdev] Being able to know the jitted code-size before emitting
...>>>> + virtual void startFunction(MachineFunction &F) { >>>> + CurBufferPtr = 0; >>>> + Fn = &F; >>>> + >>>> + // Ensure the constant pool/jump table info is at least 4-byte >>>> aligned. >>>> + emitAlignment(16); >>>> + >>>> + initConstantPool(F.getConstantPool()); >>>> + initJumpTableInfo(F.getJumpTableInfo()); >>>> + >>>> + ConstantPoolBase = (void*)(((uintptr_t) ConstantPoolBase) + >>>> CurBufferPtr); >>>&...
2008 Apr 05
2
[LLVMdev] Being able to know the jitted code-size before emitting
...t;>>>>> + CurBufferPtr = 0; >>>>>> + Fn = &F; >>>>>> + >>>>>> + // Ensure the constant pool/jump table info is at least 4- >>>>>> byte >>>>>> aligned. >>>>>> + emitAlignment(16); >>>>>> + >>>>>> + initConstantPool(F.getConstantPool()); >>>>>> + initJumpTableInfo(F.getJumpTableInfo()); >>>>>> + >>>>>> + ConstantPoolBase = (void*)(((uintptr_t) ConstantPoolBase) + >&...
2008 Apr 05
0
[LLVMdev] Being able to know the jitted code-size before emitting
...+ CurBufferPtr = 0; >>>>>>> + Fn = &F; >>>>>>> + >>>>>>> + // Ensure the constant pool/jump table info is at least 4- >>>>>>> byte >>>>>>> aligned. >>>>>>> + emitAlignment(16); >>>>>>> + >>>>>>> + initConstantPool(F.getConstantPool()); >>>>>>> + initJumpTableInfo(F.getJumpTableInfo()); >>>>>>> + >>>>>>> + ConstantPoolBase = (void*)(((uintptr_t) &gt...
2008 Apr 04
0
[LLVMdev] Being able to know the jitted code-size before emitting
...MachineFunction &F) { >>>>> + CurBufferPtr = 0; >>>>> + Fn = &F; >>>>> + >>>>> + // Ensure the constant pool/jump table info is at least 4- >>>>> byte >>>>> aligned. >>>>> + emitAlignment(16); >>>>> + >>>>> + initConstantPool(F.getConstantPool()); >>>>> + initJumpTableInfo(F.getJumpTableInfo()); >>>>> + >>>>> + ConstantPoolBase = (void*)(((uintptr_t) ConstantPoolBase) + >>>>> CurB...
2008 Apr 07
2
[LLVMdev] Being able to know the jitted code-size before emitting
...gt;>>>>>>> + Fn = &F; >>>>>>>> + >>>>>>>> + // Ensure the constant pool/jump table info is at least 4- >>>>>>>> byte >>>>>>>> aligned. >>>>>>>> + emitAlignment(16); >>>>>>>> + >>>>>>>> + initConstantPool(F.getConstantPool()); >>>>>>>> + initJumpTableInfo(F.getJumpTableInfo()); >>>>>>>> + >>>>>>>> + ConstantPoolBase = (void*...
2008 Apr 07
0
[LLVMdev] Being able to know the jitted code-size before emitting
...gt;>>>>>> + >>>>>>>>> + // Ensure the constant pool/jump table info is at least >>>>>>>>> 4- >>>>>>>>> byte >>>>>>>>> aligned. >>>>>>>>> + emitAlignment(16); >>>>>>>>> + >>>>>>>>> + initConstantPool(F.getConstantPool()); >>>>>>>>> + initJumpTableInfo(F.getJumpTableInfo()); >>>>>>>>> + >>>>>>>>> + Consta...
2007 Dec 11
0
[LLVMdev] Exception handling in JIT
...ive and value. > + /// > + void EmitInt64(uint64_t Value) { > + if (CurBufferPtr+8 <= BufferEnd) { > + *((uint64_t*)CurBufferPtr) = Value; > + CurBufferPtr += 8; > + } else { > + CurBufferPtr = BufferEnd; > + } > + } > + > + > + /// emitAlignment - Move the CurBufferPtr pointer up the the > specified > + /// alignment (saturated to BufferEnd of course). > + void EmitAlignment(unsigned Alignment) { > +// printf(".align %x\n", 1 << Alignment); > + if (Alignment == 0) Alignment = 1; > + // Mov...
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
2007 Aug 24
0
[LLVMdev] Turning on exception handling codegen
Hi Duncan, > > I'm trying it on 4.0. On 4.2, I'm getting this problem during bootstrapping: > > > > ccAMeZbg.s:111:non-relocatable subtraction expression, > > "___gxx_personality_v0" minus "L0" > > ccAMeZbg.s:111:symbol: "___gxx_personality_v0" can't be undefined in a > > subtraction expression > > this is the
2015 Dec 27
3
Any way to disable the alignment of functions?
...he target in case no attributes are specified for a function. "An explicit alignment may be specified for a function. If not present, or if the alignment is set to zero, the alignment of the function is set by the target to whatever it feels convenient.” So, as a first try, I dived into the “EmitAlignment” code in AsmPrinter.cpp and simply removed the function alignment part. Interestingly the compilation seems flawless at many cases (large programs) but on a few programs, it produces a segfault-generating executable. So my guess is that for some functions, alignment is necessary for soundness,...
2007 Dec 12
3
[LLVMdev] Exception handling in JIT
...EmitInt64(uint64_t Value) { >> + if (CurBufferPtr+8 <= BufferEnd) { >> + *((uint64_t*)CurBufferPtr) = Value; >> + CurBufferPtr += 8; >> + } else { >> + CurBufferPtr = BufferEnd; >> + } >> + } >> + >> + >> + /// emitAlignment - Move the CurBufferPtr pointer up the the >> specified >> + /// alignment (saturated to BufferEnd of course). >> + void EmitAlignment(unsigned Alignment) { >> +// printf(".align %x\n", 1 << Alignment); >> + if (Alignment == 0) Alignment =...
2007 Aug 24
5
[LLVMdev] Turning on exception handling codegen
Hi Bill, > I'm trying it on 4.0. On 4.2, I'm getting this problem during bootstrapping: > > ccAMeZbg.s:111:non-relocatable subtraction expression, > "___gxx_personality_v0" minus "L0" > ccAMeZbg.s:111:symbol: "___gxx_personality_v0" can't be undefined in a > subtraction expression this is the darwin assembler that barfs, right? It
2008 Feb 04
0
[LLVMdev] Exception handling in JIT
...sizeof(int8_t) + // TType format > + AsmPrinter::SizeULEB128(TypeOffset) + // > TType base offset > + TypeOffset; > + > + unsigned SizeAlign = (4 - TotalSize) & 3; > + > + // Begin the exception table. > + MCE->emitAlignment(4); > + for (unsigned i = 0; i != SizeAlign; ++i) { > + MCE->emitByte(0); > + // Asm->EOL("Padding"); > + } > + > + unsigned char* DwarfExceptionTable = (unsigned char*)MCE- > >getCurrentPCValue(); > + > + // Emit the header. > + MCE-...
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:
2012 Oct 29
0
[LLVMdev] R_ARM_ABS32 disassembly with integrated-as
I ran into a bug in this patch. The mapping symbol produced is aligned and it should not be. Is there a way to configure the MCSymbolRefExpr such that the emitted symbol is unaligned? Alternatively, should the ARM/Thumb code be realigned after a data-in-code section? I notice that GCC leaves it unaligned. Thanks, Greg On Wed, Oct 17, 2012 at 2:32 PM, Renato Golin <rengolin at
2012 Oct 17
2
[LLVMdev] R_ARM_ABS32 disassembly with integrated-as
On 17 October 2012 22:23, Greg Fitzgerald <garious at gmail.com> wrote: > I had to move MCELF.h to "include/llvm/MC" and added a > MCELFStreamer.h to the same directory. That okay to do? This is not a trivial question, and I'll let others chip in. Superficially, you'd think so and it might make sense in the long run, but you have to consider why it wasn't there