search for: emitstring

Displaying 5 results from an estimated 5 matches for "emitstring".

2008 Feb 04
0
[LLVMdev] Exception handling in JIT
...; > + > + do { > + unsigned char Byte = Value & 0x7f; > + Value >>= 7; > + IsMore = Value != Sign || ((Byte ^ Sign) & 0x40) != 0; > + if (IsMore) Byte |= 0x80; > + emitByte(Byte); > + } while (IsMore); > + } > + > + /// emitString - This callback is invoked when a String needs to 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); > + } &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:
2007 Dec 11
0
[LLVMdev] Exception handling in JIT
...> + do { > + unsigned char Byte = Value & 0x7f; > + Value >>= 7; > + IsMore = Value != Sign || ((Byte ^ Sign) & 0x40) != 0; > + if (IsMore) Byte |= 0x80; > + EmitInt8(Byte, false); > + } while (IsMore); > + } > + > + void EmitString(const std::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); > + } > + >...
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 Dec 12
3
[LLVMdev] Exception handling in JIT
...gned char Byte = Value & 0x7f; >> + Value >>= 7; >> + IsMore = Value != Sign || ((Byte ^ Sign) & 0x40) != 0; >> + if (IsMore) Byte |= 0x80; >> + EmitInt8(Byte, false); >> + } while (IsMore); >> + } >> + >> + void EmitString(const std::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)...