diff options
author | Nicolas Geoffray <nicolas.geoffray@lip6.fr> | 2008-11-18 10:44:46 +0000 |
---|---|---|
committer | Nicolas Geoffray <nicolas.geoffray@lip6.fr> | 2008-11-18 10:44:46 +0000 |
commit | 67c8c4cababc846aab461910a50fd373b35b11aa (patch) | |
tree | 11723ba0467818d7d1b9d5cee8b41da403e79418 /include/llvm | |
parent | 130fea2ca0ea21286fbdfd22a977b723e4242f3a (diff) | |
download | external_llvm-67c8c4cababc846aab461910a50fd373b35b11aa.zip external_llvm-67c8c4cababc846aab461910a50fd373b35b11aa.tar.gz external_llvm-67c8c4cababc846aab461910a50fd373b35b11aa.tar.bz2 |
Implement support for JIT exceptions on X86_64. Relative offsets are
encoded on 32 bytes, and the personality function is not encoded as
relative.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59516 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r-- | include/llvm/CodeGen/MachineCodeEmitter.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/include/llvm/CodeGen/MachineCodeEmitter.h b/include/llvm/CodeGen/MachineCodeEmitter.h index a14e4c1..d83591b 100644 --- a/include/llvm/CodeGen/MachineCodeEmitter.h +++ b/include/llvm/CodeGen/MachineCodeEmitter.h @@ -228,12 +228,19 @@ public: } } - /// emitAt - Emit Value in Addr - void emitAt(uintptr_t *Addr, uintptr_t Value) { + /// emitInt32At - Emit the Int32 Value in Addr. + void emitInt32At(uintptr_t *Addr, uintptr_t Value) { if (Addr >= (uintptr_t*)BufferBegin && Addr < (uintptr_t*)BufferEnd) - (*Addr) = Value; + (*(uint32_t*)Addr) = (uint32_t)Value; } + /// emitInt64At - Emit the Int64 Value in Addr. + void emitInt64At(uintptr_t *Addr, uintptr_t Value) { + if (Addr >= (uintptr_t*)BufferBegin && Addr < (uintptr_t*)BufferEnd) + (*(uint64_t*)Addr) = (uint64_t)Value; + } + + /// emitLabel - Emits a label virtual void emitLabel(uint64_t LabelID) = 0; |