mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-01-06 22:48:25 +01:00
A64: Implement FABD in terms of existing IR instructions
Fixes NaN issue. Closes #306.
This commit is contained in:
parent
1dbe9d95e6
commit
e18fca17dc
6 changed files with 5 additions and 42 deletions
|
|
@ -173,12 +173,11 @@ bool TranslatorVisitor::CMTST_1(Imm<2> size, Vec Vm, Vec Vn, Vec Vd) {
|
|||
bool TranslatorVisitor::FABD_2(bool sz, Vec Vm, Vec Vn, Vec Vd) {
|
||||
const size_t esize = sz ? 64 : 32;
|
||||
|
||||
const IR::U128 operand1 = V(esize, Vn);
|
||||
const IR::U128 operand2 = V(esize, Vm);
|
||||
const IR::U128 difference = ir.FPVectorAbsoluteDifference(esize, operand1, operand2);
|
||||
const IR::U128 result = ir.VectorZeroUpper(difference);
|
||||
const IR::U32U64 operand1 = V_scalar(esize, Vn);
|
||||
const IR::U32U64 operand2 = V_scalar(esize, Vm);
|
||||
const IR::U32U64 result = ir.FPAbs(ir.FPSub(operand1, operand2, true));
|
||||
|
||||
V(128, Vd, result);
|
||||
V_scalar(esize, Vd, result);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue