search for: emitint32

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

2008 Feb 04
0
[LLVMdev] Exception handling in JIT
...be > + /// written to the output stream. > + void emitString(const std::string &String) { > + for (unsigned i = 0, N = String.size(); i < N; ++i) { > + unsigned char C = String[i]; > + emitByte(C); > + } > + emitByte(0); > + } > + > + /// emitInt32 - Emit a int32 directive. > + void emitInt32(int Value) { > + if (CurBufferPtr+4 <= BufferEnd) { > + *((uint32_t*)CurBufferPtr) = Value; > + CurBufferPtr += 4; > + } else { > + CurBufferPtr = BufferEnd; > + } > + } > + > + /// emitInt64 -...
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:
2007 Dec 11
0
[LLVMdev] Exception handling in JIT
...td::string &String) { > +// printf(".asciiz %s\n", String.c_str()); > + for (unsigned i = 0, N = String.size(); i < N; ++i) { > + unsigned char C = String[i]; > + EmitInt8(C, false); > + } > + EmitInt8(0, false); > + } > + > + void EmitInt32(int Value) { > +// printf(".long 0x%x\n", Value); > + if (CurBufferPtr+4 <= BufferEnd) { > + *((uint32_t*)CurBufferPtr) = Value; > + CurBufferPtr += 4; > + } else { > + CurBufferPtr = BufferEnd; > + } > + } > + > + /// EmitInt6...
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
2018 Mar 09
2
Why is there no EmitInt64 in AsmPrinter?
Hi all, The AsmPrinter class supports functions like EmitInt8, EmitInt16, and EmitInt32 for writing a 1/2/4 byte directive to the assembly. Each of these calls the MCStreamer::EmitIntValue method with the corresponding size. For some reason, there is no EmitInt64, and I was wondering if there was a fundamental reason why? The EmitIntValue function appears to support 8-byte inputs. I...
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 --------------
2015 Aug 04
2
[LLVMdev] Help needed about code & data mixing when emit object files
Hi, I'm building a new backend which can only load very limited range of imm. So I decided to use constant pool, and place constant pool entries close enough to instructions use the entries (we have very limited range PC-relative memory load). However, lld & llc output the object files that gather all constant pool entries into one section. How can I make them mix these entries into code
2008 Apr 01
2
[LLVMdev] Being able to know the jitted code-size before emitting
...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) { >> + } >> + >> + >> + >> + virtual void...
2008 Mar 31
0
[LLVMdev] Being able to know the jitted code-size before emitting
...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) { > + } > + > + > + > + virtual void StartMachineBasicBlock(MachineBasicBlock *M...
2008 Apr 01
0
[LLVMdev] Being able to know the jitted code-size before emitting
...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) { >>> + } >>> + >>> +...
2008 Apr 04
3
[LLVMdev] Being able to know the jitted code-size before emitting
...Ptr++; >>>> + } >>>> + 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) { >>>> + } &...
2008 Apr 05
2
[LLVMdev] Being able to know the jitted code-size before emitting
...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 *...
2008 Apr 05
0
[LLVMdev] Being able to know the jitted code-size before emitting
...(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...
2008 Apr 04
0
[LLVMdev] Being able to know the jitted code-size before emitting
...>>>>> + 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) {...
2008 Apr 07
2
[LLVMdev] Being able to know the jitted code-size before emitting
...gt;>>>>> + 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...
2018 Mar 20
0
Why is there no EmitInt64 in AsmPrinter?
...--paulr From: llvm-dev [mailto:llvm-dev-bounces at lists.llvm.org] On Behalf Of James Henderson via llvm-dev Sent: Friday, March 09, 2018 7:44 AM To: llvm-dev Subject: [llvm-dev] Why is there no EmitInt64 in AsmPrinter? Hi all, The AsmPrinter class supports functions like EmitInt8, EmitInt16, and EmitInt32 for writing a 1/2/4 byte directive to the assembly. Each of these calls the MCStreamer::EmitIntValue method with the corresponding size. For some reason, there is no EmitInt64, and I was wondering if there was a fundamental reason why? The EmitIntValue function appears to support 8-byte inputs. I d...
2008 Apr 07
0
[LLVMdev] Being able to know the jitted code-size before emitting
...gt; + CurBufferPtr+=4; >>>>>>>>> + } >>>>>>>>> + virtual void emitWordBE(unsigned W) { >>>>>>>>> + CurBufferPtr+=4; >>>>>>>>> + } >>>>>>>>> + virtual void emitInt32(int Value) { >>>>>>>>> + CurBufferPtr += 4; >>>>>>>>> + } >>>>>>>>> + virtual void emitInt64(uint64_t Value) { >>>>>>>>> + CurBufferPtr += 8; >>>>>>>>> + }...
2013 Oct 15
0
[LLVMdev] [Debug Info PATCH] for support of ref_addr and removal of DIE duplication
...set related stuff since I'm less > familiar with that. > Eric, Do you want to take a look at the 1st patch? > > There's one or two cases of {} on single-statement blocks you could fix up. > I couldn't find that. Are you referring to: + } else { + Asm->EmitInt32(Addr); + } It has a multi-statement if, I thought the rule is to have a parenthesis for the else as well. > > "DebugInfoOffset" (both the member and the functions to set/get it) might > be more meaningfully named "SectionOffset" - but I'm not sure. Eric? Oth...
2013 Oct 15
1
[LLVMdev] [Debug Info PATCH] for support of ref_addr and removal of DIE duplication
...een following the thread, but give me a day or so. Thanks. -eric >> >> >> There's one or two cases of {} on single-statement blocks you could fix >> up. > > I couldn't find that. > Are you referring to: > > + } else { > > + Asm->EmitInt32(Addr); > > + } > > It has a multi-statement if, I thought the rule is to have a parenthesis for > the else as well. > >> >> >> "DebugInfoOffset" (both the member and the functions to set/get it) might >> be more meaningfully named "Secti...
2007 Dec 12
3
[LLVMdev] Exception handling in JIT
...// printf(".asciiz %s\n", String.c_str()); >> + for (unsigned i = 0, N = String.size(); i < N; ++i) { >> + unsigned char C = String[i]; >> + EmitInt8(C, false); >> + } >> + EmitInt8(0, false); >> + } >> + >> + void EmitInt32(int Value) { >> +// printf(".long 0x%x\n", Value); >> + if (CurBufferPtr+4 <= BufferEnd) { >> + *((uint32_t*)CurBufferPtr) = Value; >> + CurBufferPtr += 4; >> + } else { >> + CurBufferPtr = BufferEnd; >> + } >>...