mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-12 01:41:37 +00:00
Undo 58778 but makes the binary dump prettier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58782 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b4b130f0b1
commit
a7916f586d
@ -38,6 +38,9 @@
|
||||
#include "llvm/ADT/Statistic.h"
|
||||
#include <algorithm>
|
||||
#include <set>
|
||||
#ifndef NDEBUG
|
||||
#include <iomanip>
|
||||
#endif
|
||||
using namespace llvm;
|
||||
|
||||
STATISTIC(NumBytes, "Number of bytes of machine code compiled");
|
||||
@ -954,9 +957,24 @@ bool JITEmitter::finishFunction(MachineFunction &F) {
|
||||
MemMgr->setMemoryExecutable();
|
||||
|
||||
#ifndef NDEBUG
|
||||
{
|
||||
if (sys::hasDisassembler())
|
||||
DOUT << "Disassembled code:\n"
|
||||
<< sys::disassembleBuffer(FnStart, FnEnd-FnStart, (uintptr_t)FnStart);
|
||||
else {
|
||||
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<< std::setw(2) << std::setfill('0') << (unsigned short)*q << " ";
|
||||
if (i%8==0)
|
||||
DOUT<<"\n";
|
||||
}
|
||||
DOUT << std::dec;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (ExceptionHandling) {
|
||||
uintptr_t ActualSize = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user