зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1199171 part 0 - Add spewInst function for debugging Jit code. r=lth
This commit is contained in:
Родитель
ebdcf9fc9e
Коммит
a61fb2159f
|
@ -1410,6 +1410,17 @@ Assembler::bytesNeeded() const
|
|||
|
||||
#ifdef JS_DISASM_ARM
|
||||
|
||||
void
|
||||
Assembler::spewInst(Instruction* i)
|
||||
{
|
||||
disasm::NameConverter converter;
|
||||
disasm::Disassembler dasm(converter);
|
||||
disasm::EmbeddedVector<char, disasm::ReasonableBufferSize> buffer;
|
||||
uint8_t* loc = reinterpret_cast<uint8_t*>(const_cast<uint32_t*>(i->raw()));
|
||||
dasm.InstructionDecode(buffer, loc);
|
||||
printf(" %08x %s\n", reinterpret_cast<uint32_t>(loc), buffer.start());
|
||||
}
|
||||
|
||||
// Labels are named as they are encountered by adding names to a
|
||||
// table, using the Label address as the key. This is made tricky by
|
||||
// the (memory for) Label objects being reused, but reused label
|
||||
|
|
|
@ -1260,6 +1260,7 @@ class Assembler : public AssemblerShared
|
|||
}
|
||||
|
||||
#ifdef JS_DISASM_ARM
|
||||
static void spewInst(Instruction* i);
|
||||
void spew(Instruction* i);
|
||||
void spewBranch(Instruction* i, Label* target);
|
||||
void spewData(BufferOffset addr, size_t numInstr, bool loadToPC);
|
||||
|
|
Загрузка…
Ссылка в новой задаче