Making debug disassembly look a bit better.
This commit is contained in:
parent
cb352c6c86
commit
20c8eb1561
|
@ -520,8 +520,14 @@ void alloy::backend::x64::lowering::RegisterSequences(LoweringTable* table) {
|
||||||
// --------------------------------------------------------------------------
|
// --------------------------------------------------------------------------
|
||||||
|
|
||||||
table->AddSequence(OPCODE_SOURCE_OFFSET, [](X64Emitter& e, Instr*& i) {
|
table->AddSequence(OPCODE_SOURCE_OFFSET, [](X64Emitter& e, Instr*& i) {
|
||||||
// TODO(benvanik): translate source offsets for mapping? We're just passing
|
#if XE_DEBUG
|
||||||
// down the original offset - it may be nice to have two.
|
e.nop();
|
||||||
|
e.nop();
|
||||||
|
e.mov(e.eax, (uint32_t)i->src1.offset);
|
||||||
|
e.nop();
|
||||||
|
e.nop();
|
||||||
|
#endif // XE_DEBUG
|
||||||
|
|
||||||
e.MarkSourceOffset(i);
|
e.MarkSourceOffset(i);
|
||||||
i = e.Advance(i);
|
i = e.Advance(i);
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -162,6 +162,14 @@ int X64Emitter::Emit(HIRBuilder* builder) {
|
||||||
}
|
}
|
||||||
ret();
|
ret();
|
||||||
|
|
||||||
|
#if XE_DEBUG
|
||||||
|
nop();
|
||||||
|
nop();
|
||||||
|
nop();
|
||||||
|
nop();
|
||||||
|
nop();
|
||||||
|
#endif // XE_DEBUG
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue