backend/arm64: Implement A32UpdateUpperLocationDescriptor
This commit is contained in:
parent
00ad84b7ab
commit
67dc7f2e4e
2 changed files with 14 additions and 2 deletions
|
@ -34,6 +34,8 @@ void EmitIR<IR::Opcode::A32GetCFlag>(oaknut::CodeGenerator& code, EmitContext& c
|
||||||
template<>
|
template<>
|
||||||
void EmitIR<IR::Opcode::A32SetCpsrNZC>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst* inst);
|
void EmitIR<IR::Opcode::A32SetCpsrNZC>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst* inst);
|
||||||
template<>
|
template<>
|
||||||
|
void EmitIR<IR::Opcode::A32UpdateUpperLocationDescriptor>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst*);
|
||||||
|
template<>
|
||||||
void EmitIR<IR::Opcode::LogicalShiftLeft32>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst* inst);
|
void EmitIR<IR::Opcode::LogicalShiftLeft32>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst* inst);
|
||||||
template<>
|
template<>
|
||||||
void EmitIR<IR::Opcode::MostSignificantBit>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst* inst);
|
void EmitIR<IR::Opcode::MostSignificantBit>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst* inst);
|
||||||
|
|
|
@ -50,8 +50,8 @@ void EmitSetUpperLocationDescriptor(oaknut::CodeGenerator& code, EmitContext& ct
|
||||||
}();
|
}();
|
||||||
|
|
||||||
if (old_upper != new_upper) {
|
if (old_upper != new_upper) {
|
||||||
code.MOV(Xscratch0, new_upper);
|
code.MOV(Wscratch0, new_upper);
|
||||||
code.STR(Xscratch0, Xstate, offsetof(A32JitState, upper_location_descriptor));
|
code.STR(Wscratch0, Xstate, offsetof(A32JitState, upper_location_descriptor));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -175,4 +175,14 @@ void EmitIR<IR::Opcode::A32SetCpsrNZC>(oaknut::CodeGenerator& code, EmitContext&
|
||||||
code.STR(Wscratch0, Xstate, offsetof(A32JitState, cpsr_nzcv));
|
code.STR(Wscratch0, Xstate, offsetof(A32JitState, cpsr_nzcv));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<>
|
||||||
|
void EmitIR<IR::Opcode::A32UpdateUpperLocationDescriptor>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst*) {
|
||||||
|
for (auto& inst : ctx.block) {
|
||||||
|
if (inst.GetOpcode() == IR::Opcode::A32BXWritePC) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
EmitSetUpperLocationDescriptor(code, ctx, ctx.block.EndLocation(), ctx.block.Location());
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace Dynarmic::Backend::Arm64
|
} // namespace Dynarmic::Backend::Arm64
|
||||||
|
|
Loading…
Reference in a new issue