mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Bug 1199171 part 0 - Add spewInst function for debugging Jit code. r=lth
This commit is contained in:
parent
ebdcf9fc9e
commit
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);
|
||||
|
Loading…
Reference in New Issue
Block a user