IR: Add Breakpoint IR instruction (for debugging purposes, emits a host-breakpoint)
This commit is contained in:
parent
39563c8ea8
commit
ca40015145
4 changed files with 11 additions and 0 deletions
|
@ -87,6 +87,10 @@ CodePtr EmitX64::Emit(const Arm::LocationDescriptor descriptor, Dynarmic::IR::Bl
|
|||
return code_ptr;
|
||||
}
|
||||
|
||||
void EmitX64::EmitBreakpoint(IR::Block&, IR::Inst*) {
|
||||
code->INT3();
|
||||
}
|
||||
|
||||
void EmitX64::EmitIdentity(IR::Block& block, IR::Inst* inst) {
|
||||
// TODO: Possible unnecessary mov here.
|
||||
reg_alloc.UseDefRegister(inst->GetArg(0), inst, any_gpr);
|
||||
|
|
|
@ -261,6 +261,10 @@ void IREmitter::WriteMemory64(const IR::Value& vaddr, const IR::Value& value) {
|
|||
}
|
||||
}
|
||||
|
||||
void IREmitter::Breakpoint() {
|
||||
Inst(IR::Opcode::Breakpoint, {});
|
||||
}
|
||||
|
||||
void IREmitter::SetTerm(const IR::Terminal& terminal) {
|
||||
ASSERT_MSG(block.terminal.which() == 0, "Terminal has already been set.");
|
||||
block.terminal = terminal;
|
||||
|
|
|
@ -89,6 +89,8 @@ public:
|
|||
void WriteMemory32(const IR::Value& vaddr, const IR::Value& value);
|
||||
void WriteMemory64(const IR::Value& vaddr, const IR::Value& value);
|
||||
|
||||
void Breakpoint();
|
||||
|
||||
void SetTerm(const IR::Terminal& terminal);
|
||||
|
||||
private:
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
// opcode name, return type, arg1 type, arg2 type, arg3 type, ...
|
||||
|
||||
OPCODE(Identity, T::Opaque, T::Opaque )
|
||||
OPCODE(Breakpoint, T::Void, )
|
||||
|
||||
// ARM Context getters/setters
|
||||
OPCODE(GetRegister, T::U32, T::RegRef )
|
||||
|
|
Loading…
Reference in a new issue