mirror of
https://github.com/izzy2lost/xenia-edge.git
synced 2026-07-06 00:20:26 -07:00
[a64] Fix OPCODE_VECTOR_CONVERT_{I2F,F2I}
😳
This commit is contained in:
+6
-4
@@ -68,10 +68,11 @@ struct VECTOR_CONVERT_I2F
|
||||
// Merge the two ways depending on whether the number is >= 0x80000000
|
||||
// (has high bit set).
|
||||
// e.vblendvps(i.dest, Q1, Q0, i.src1);
|
||||
e.FCVTNU(i.dest.reg().S4(), i.src1.reg().S4());
|
||||
e.UCVTF(i.dest.reg().S4(), i.src1.reg().S4());
|
||||
|
||||
} else {
|
||||
e.FCVTNS(i.dest.reg().S4(), i.src1.reg().S4());
|
||||
// e.vcvtdq2ps(i.dest, i.src1);
|
||||
e.SCVTF(i.dest.reg().S4(), i.src1.reg().S4());
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -108,7 +109,8 @@ struct VECTOR_CONVERT_F2I
|
||||
|
||||
// saturate values > UINT_MAX
|
||||
// e.vpor(i.dest, i.dest, Q0);
|
||||
e.UCVTF(i.dest.reg().S4(), i.src1.reg().S4());
|
||||
e.FCVTNU(i.dest.reg().S4(), i.src1.reg().S4());
|
||||
|
||||
} else {
|
||||
// xmm2 = NaN mask
|
||||
// e.vcmpunordps(e.xmm2, i.src1, i.src1);
|
||||
@@ -125,7 +127,7 @@ struct VECTOR_CONVERT_F2I
|
||||
|
||||
// mask NaNs
|
||||
// e.vpandn(i.dest, e.xmm2, i.dest);
|
||||
e.SCVTF(i.dest.reg().S4(), i.src1.reg().S4());
|
||||
e.FCVTNS(i.dest.reg().S4(), i.src1.reg().S4());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user