A64: Implement FRECPX's half-precision floating point variant
This commit is contained in:
parent
bd892ec4ef
commit
3a3542414b
2 changed files with 9 additions and 1 deletions
|
@ -420,7 +420,7 @@ INST(FCVTPS_2, "FCVTPS (vector)", "01011
|
||||||
INST(FCVTZS_int_2, "FCVTZS (vector, integer)", "010111101z100001101110nnnnnddddd")
|
INST(FCVTZS_int_2, "FCVTZS (vector, integer)", "010111101z100001101110nnnnnddddd")
|
||||||
//INST(FRECPE_1, "FRECPE", "0101111011111001110110nnnnnddddd")
|
//INST(FRECPE_1, "FRECPE", "0101111011111001110110nnnnnddddd")
|
||||||
INST(FRECPE_2, "FRECPE", "010111101z100001110110nnnnnddddd")
|
INST(FRECPE_2, "FRECPE", "010111101z100001110110nnnnnddddd")
|
||||||
//INST(FRECPX_1, "FRECPX", "0101111011111001111110nnnnnddddd")
|
INST(FRECPX_1, "FRECPX", "0101111011111001111110nnnnnddddd")
|
||||||
INST(FRECPX_2, "FRECPX", "010111101z100001111110nnnnnddddd")
|
INST(FRECPX_2, "FRECPX", "010111101z100001111110nnnnnddddd")
|
||||||
//INST(FCVTNU_1, "FCVTNU (vector)", "0111111001111001101010nnnnnddddd")
|
//INST(FCVTNU_1, "FCVTNU (vector)", "0111111001111001101010nnnnnddddd")
|
||||||
INST(FCVTNU_2, "FCVTNU (vector)", "011111100z100001101010nnnnnddddd")
|
INST(FCVTNU_2, "FCVTNU (vector)", "011111100z100001101010nnnnnddddd")
|
||||||
|
|
|
@ -182,6 +182,14 @@ bool TranslatorVisitor::FRECPE_2(bool sz, Vec Vn, Vec Vd) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool TranslatorVisitor::FRECPX_1(Vec Vn, Vec Vd) {
|
||||||
|
const IR::U16 operand = V_scalar(16, Vn);
|
||||||
|
const IR::U16 result = ir.FPRecipExponent(operand);
|
||||||
|
|
||||||
|
V_scalar(16, Vd, result);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool TranslatorVisitor::FRECPX_2(bool sz, Vec Vn, Vec Vd) {
|
bool TranslatorVisitor::FRECPX_2(bool sz, Vec Vn, Vec Vd) {
|
||||||
const size_t esize = sz ? 64 : 32;
|
const size_t esize = sz ? 64 : 32;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue