mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-01-05 22:18:16 +01:00
IR: FPCompare{32,64} now return NZCV flags instead of implicitly setting them
This commit is contained in:
parent
2ee39d6b36
commit
aac5af50e2
10 changed files with 51 additions and 26 deletions
|
|
@ -154,7 +154,7 @@ IR::U32 IREmitter::GetFpscrNZCV() {
|
|||
return Inst<IR::U32>(Opcode::A32GetFpscrNZCV);
|
||||
}
|
||||
|
||||
void IREmitter::SetFpscrNZCV(const IR::U32& new_fpscr_nzcv) {
|
||||
void IREmitter::SetFpscrNZCV(const IR::NZCV& new_fpscr_nzcv) {
|
||||
Inst(Opcode::A32SetFpscrNZCV, new_fpscr_nzcv);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ public:
|
|||
IR::U32 GetFpscr();
|
||||
void SetFpscr(const IR::U32& new_fpscr);
|
||||
IR::U32 GetFpscrNZCV();
|
||||
void SetFpscrNZCV(const IR::U32& new_fpscr_nzcv);
|
||||
void SetFpscrNZCV(const IR::NZCV& new_fpscr_nzcv);
|
||||
|
||||
void ClearExclusive();
|
||||
void SetExclusive(const IR::U32& vaddr, size_t byte_size);
|
||||
|
|
|
|||
|
|
@ -473,7 +473,8 @@ bool ArmTranslatorVisitor::vfp2_VCMP(Cond cond, bool D, size_t Vd, bool sz, bool
|
|||
if (ConditionPassed(cond)) {
|
||||
auto reg_d = ir.GetExtendedRegister(d);
|
||||
auto reg_m = ir.GetExtendedRegister(m);
|
||||
ir.FPCompare(reg_d, reg_m, exc_on_qnan, true);
|
||||
auto nzcv = ir.FPCompare(reg_d, reg_m, exc_on_qnan, true);
|
||||
ir.SetFpscrNZCV(nzcv);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
@ -486,9 +487,11 @@ bool ArmTranslatorVisitor::vfp2_VCMP_zero(Cond cond, bool D, size_t Vd, bool sz,
|
|||
if (ConditionPassed(cond)) {
|
||||
auto reg_d = ir.GetExtendedRegister(d);
|
||||
if (sz) {
|
||||
ir.FPCompare(reg_d, ir.Imm64(0), exc_on_qnan, true);
|
||||
auto nzcv = ir.FPCompare(reg_d, ir.Imm64(0), exc_on_qnan, true);
|
||||
ir.SetFpscrNZCV(nzcv);
|
||||
} else {
|
||||
ir.FPCompare(reg_d, ir.Imm32(0), exc_on_qnan, true);
|
||||
auto nzcv = ir.FPCompare(reg_d, ir.Imm32(0), exc_on_qnan, true);
|
||||
ir.SetFpscrNZCV(nzcv);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue