>> // Update the GOT entry for F to point to the new code. >> - if(MemMgr.isManagingGOT()) { >> + if (MemMgr.isManagingGOT()) { >> unsigned idx = getJITResolver(this).getGOTIndexForAddr((void*) >> BufferBegin); >> if (((void**)MemMgr.getGOTBase())[idx] != (void*)BufferBegin) { >> DOUT << "GOT was out of date for " << (void*)BufferBegin >> @@ -864,6 +865,18 @@ >> << ": " << (FnEnd-FnStart) << " bytes of text, " >> << Relocations.size() << " relocations\n"; >> Relocations.clear(); >> + >> + DOUT << "Disassembled code:\n" >> +#if defined(__i386__) >> + << disassembleBuffer(FnStart, FnEnd-FnStart, >> + Disassembler::X86_32, (uint32_t) >> FnStart); > > I'm not thrilled about having this system specific > #if/#elif/#else/#endif in the JITEmitter. I would prefer to see the > disassemblBuffer function become part of lib/System instead of > lib/Support and DTRT for any combination of supported platforms. The > list of disassembled architectures will grow over time (PPC/ARM/Sparc) > and I'd rather not have this sprinkled across the users of > disassembleBuffer but in one location in lib/System.
FWIW, I agree with Reid. I think disassembleBuffer can just assume that we want to disassemble for the current ISA. -Chris _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits