diff --git a/src/frontend/A64/translate/impl/floating_point_data_processing_three_register.cpp b/src/frontend/A64/translate/impl/floating_point_data_processing_three_register.cpp index 0401cf9f..db23bf10 100644 --- a/src/frontend/A64/translate/impl/floating_point_data_processing_three_register.cpp +++ b/src/frontend/A64/translate/impl/floating_point_data_processing_three_register.cpp @@ -12,56 +12,56 @@ namespace Dynarmic::A64 { bool TranslatorVisitor::FMADD_float(Imm<2> type, Vec Vm, Vec Va, Vec Vn, Vec Vd) { const auto datasize = FPGetDataSize(type); - if (!datasize || *datasize == 16) { + if (!datasize) { return UnallocatedEncoding(); } - const IR::U32U64 operanda = V_scalar(*datasize, Va); - const IR::U32U64 operand1 = V_scalar(*datasize, Vn); - const IR::U32U64 operand2 = V_scalar(*datasize, Vm); - const IR::U32U64 result = ir.FPMulAdd(operanda, operand1, operand2, true); + const IR::U16U32U64 operanda = V_scalar(*datasize, Va); + const IR::U16U32U64 operand1 = V_scalar(*datasize, Vn); + const IR::U16U32U64 operand2 = V_scalar(*datasize, Vm); + const IR::U16U32U64 result = ir.FPMulAdd(operanda, operand1, operand2, true); V_scalar(*datasize, Vd, result); return true; } bool TranslatorVisitor::FMSUB_float(Imm<2> type, Vec Vm, Vec Va, Vec Vn, Vec Vd) { const auto datasize = FPGetDataSize(type); - if (!datasize || *datasize == 16) { + if (!datasize) { return UnallocatedEncoding(); } - const IR::U32U64 operanda = V_scalar(*datasize, Va); - const IR::U32U64 operand1 = V_scalar(*datasize, Vn); - const IR::U32U64 operand2 = V_scalar(*datasize, Vm); - const IR::U32U64 result = ir.FPMulAdd(operanda, ir.FPNeg(operand1), operand2, true); + const IR::U16U32U64 operanda = V_scalar(*datasize, Va); + const IR::U16U32U64 operand1 = V_scalar(*datasize, Vn); + const IR::U16U32U64 operand2 = V_scalar(*datasize, Vm); + const IR::U16U32U64 result = ir.FPMulAdd(operanda, ir.FPNeg(operand1), operand2, true); V_scalar(*datasize, Vd, result); return true; } bool TranslatorVisitor::FNMADD_float(Imm<2> type, Vec Vm, Vec Va, Vec Vn, Vec Vd) { const auto datasize = FPGetDataSize(type); - if (!datasize || *datasize == 16) { + if (!datasize) { return UnallocatedEncoding(); } - const IR::U32U64 operanda = V_scalar(*datasize, Va); - const IR::U32U64 operand1 = V_scalar(*datasize, Vn); - const IR::U32U64 operand2 = V_scalar(*datasize, Vm); - const IR::U32U64 result = ir.FPMulAdd(ir.FPNeg(operanda), ir.FPNeg(operand1), operand2, true); + const IR::U16U32U64 operanda = V_scalar(*datasize, Va); + const IR::U16U32U64 operand1 = V_scalar(*datasize, Vn); + const IR::U16U32U64 operand2 = V_scalar(*datasize, Vm); + const IR::U16U32U64 result = ir.FPMulAdd(ir.FPNeg(operanda), ir.FPNeg(operand1), operand2, true); V_scalar(*datasize, Vd, result); return true; } bool TranslatorVisitor::FNMSUB_float(Imm<2> type, Vec Vm, Vec Va, Vec Vn, Vec Vd) { const auto datasize = FPGetDataSize(type); - if (!datasize || *datasize == 16) { + if (!datasize) { return UnallocatedEncoding(); } - const IR::U32U64 operanda = V_scalar(*datasize, Va); - const IR::U32U64 operand1 = V_scalar(*datasize, Vn); - const IR::U32U64 operand2 = V_scalar(*datasize, Vm); - const IR::U32U64 result = ir.FPMulAdd(ir.FPNeg(operanda), operand1, operand2, true); + const IR::U16U32U64 operanda = V_scalar(*datasize, Va); + const IR::U16U32U64 operand1 = V_scalar(*datasize, Vn); + const IR::U16U32U64 operand2 = V_scalar(*datasize, Vm); + const IR::U16U32U64 result = ir.FPMulAdd(ir.FPNeg(operanda), operand1, operand2, true); V_scalar(*datasize, Vd, result); return true; }