diff options
author | Dale Johannesen <dalej@apple.com> | 2008-08-11 23:46:25 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2008-08-11 23:46:25 +0000 |
commit | 50dd1d028021bd7fd8bca3f33633ea59577c9d5e (patch) | |
tree | 6ad12938b4220e46b67e485c4f921edf7810736c /lib/ExecutionEngine/JIT/JITEmitter.cpp | |
parent | 0eab5e2efa0741b766f71a75626f7598990d5c3d (diff) |
Some fixes for x86-64 JIT. Make it use small code
model, except for external calls; this makes
addressing modes PC-relative. Incomplete.
The assertion at the top of Emitter::runOnMachineFunction
was obviously bogus (always true) so I removed it.
If someone knows what the correct test should be to cover
all the various targets, please fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54656 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/JIT/JITEmitter.cpp')
-rw-r--r-- | lib/ExecutionEngine/JIT/JITEmitter.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/ExecutionEngine/JIT/JITEmitter.cpp b/lib/ExecutionEngine/JIT/JITEmitter.cpp index d38f9f90e2..3100f0680b 100644 --- a/lib/ExecutionEngine/JIT/JITEmitter.cpp +++ b/lib/ExecutionEngine/JIT/JITEmitter.cpp @@ -920,9 +920,22 @@ bool JITEmitter::finishFunction(MachineFunction &F) { Relocations.clear(); #ifndef NDEBUG + { + DOUT << std::hex; + int i; + unsigned char* q = FnStart; + for (i=1; q!=FnEnd; q++, i++) { + if (i%8==1) + DOUT << "0x" << (long)q << ": "; + DOUT<< (unsigned short)*q << " "; + if (i%8==0) + DOUT<<"\n"; + } + DOUT << std::dec; if (sys::hasDisassembler()) DOUT << "Disassembled code:\n" << sys::disassembleBuffer(FnStart, FnEnd-FnStart, (uintptr_t)FnStart); + } #endif if (ExceptionHandling) { uintptr_t ActualSize = 0; |