A64: Handle half-precision floating point in scalar FNEG
With the half-precision variant of the FPNeg opcode added, we can utilize it here to emulate the half-precision variant of FNEG.
This commit is contained in:
parent
c97efcb978
commit
10abc77fad
1 changed files with 3 additions and 3 deletions
|
@ -36,12 +36,12 @@ bool TranslatorVisitor::FABS_float(Imm<2> type, Vec Vn, Vec Vd) {
|
|||
|
||||
bool TranslatorVisitor::FNEG_float(Imm<2> type, Vec Vn, Vec Vd) {
|
||||
const auto datasize = FPGetDataSize(type);
|
||||
if (!datasize || *datasize == 16) {
|
||||
if (!datasize) {
|
||||
return UnallocatedEncoding();
|
||||
}
|
||||
|
||||
const IR::U32U64 operand = V_scalar(*datasize, Vn);
|
||||
const IR::U32U64 result = ir.FPNeg(operand);
|
||||
const IR::U16U32U64 operand = V_scalar(*datasize, Vn);
|
||||
const IR::U16U32U64 result = ir.FPNeg(operand);
|
||||
V_scalar(*datasize, Vd, result);
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue