VFP: Interpret VFP instructions when FPSCR.Len or FPSCR.Stride != 1

This commit is contained in:
MerryMage 2016-08-06 23:01:18 +01:00
parent 94b99f5949
commit c35f06470f
2 changed files with 5 additions and 1 deletions

View file

@ -99,6 +99,8 @@ struct LocationDescriptor {
u32 FPSCR() const { return fpscr; }
bool FPSCR_FTZ() const { return Common::Bit<24>(fpscr); }
bool FPSCR_DN() const { return Common::Bit<25>(fpscr); }
u32 FPSCR_Len() const { return Common::Bits<16, 18>(fpscr) + 1; }
u32 FPSCR_Stride() const { return Common::Bits<20, 21>(fpscr) + 1; }
bool operator == (const LocationDescriptor& o) const {
return std::tie(arm_pc, tflag, eflag, fpscr) == std::tie(o.arm_pc, o.tflag, o.eflag, o.fpscr);

View file

@ -18,7 +18,9 @@ static ExtReg ToExtReg(bool sz, size_t base, bool bit) {
}
bool ArmTranslatorVisitor::vfp2_VADD(Cond cond, bool D, size_t Vn, size_t Vd, bool sz, bool N, bool M, size_t Vm) {
// TODO: if (FSPCR.len || FPSCR.stride) return InterpretThisInstruction();
if (ir.current_location.FPSCR_Len() != 1 || ir.current_location.FPSCR_Stride() != 1)
return InterpretThisInstruction(); // TODO: Vectorised floating point instructions
ExtReg d = ToExtReg(sz, Vd, D);
ExtReg n = ToExtReg(sz, Vn, N);
ExtReg m = ToExtReg(sz, Vm, M);