FRECPE (vector)

Data processing (scalar floating-point and Advanced SIMD)

fixed bit field field the encoding fixes should be

Vector arithmetic unary special recip fp16 scalar

313029282726252423222120191817161514131211109876543210
0101111011111001110110RnRd

0101111011111001110110xxxxxxxxxx

Decode Sail

if not_bool(HaveFP16Ext()) then {
    throw(Error_Undefined())
};
let 'd = UInt(Rd);
let 'n = UInt(Rn);
let 'esize = 16;
let 'datasize = esize;
let 'elements = 1;
execute_aarch64_instrs_vector_arithmetic_unary_special_recip_fp16_sisd(d, datasize, elements, esize, n)

Vector arithmetic unary special recip float scalar

313029282726252423222120191817161514131211109876543210
010111101sz100001110110RnRd

010111101x100001110110xxxxxxxxxx

Decode Sail

let 'd = UInt(Rd);
let 'n = UInt(Rn);
let 'esize = (32 << UInt(sz));
let 'datasize = esize;
let 'elements = 1;
execute_aarch64_instrs_vector_arithmetic_unary_special_recip_fp16_sisd(d, datasize, elements, esize, n)

Vector arithmetic unary special recip fp16 SIMD

313029282726252423222120191817161514131211109876543210
0Q00111011111001110110RnRd

0x00111011111001110110xxxxxxxxxx

Decode Sail

if not_bool(HaveFP16Ext()) then {
    throw(Error_Undefined())
};
let 'd = UInt(Rd);
let 'n = UInt(Rn);
let 'esize = 16;
let 'datasize = if Q == 0b1 then 128 else 64;
let 'elements = DIV(datasize, esize);
execute_aarch64_instrs_vector_arithmetic_unary_special_recip_fp16_sisd(d, datasize, elements, esize, n)

Vector arithmetic unary special recip float SIMD

313029282726252423222120191817161514131211109876543210
0Q0011101sz100001110110RnRd

0x0011101x100001110110xxxxxxxxxx

Decode Sail

let 'd = UInt(Rd);
let 'n = UInt(Rn);
if (sz @ Q) == 0b10 then {
    throw(Error_Undefined())
};
let 'esize = (32 << UInt(sz));
let 'datasize = if Q == 0b1 then 128 else 64;
let 'elements = DIV(datasize, esize);
execute_aarch64_instrs_vector_arithmetic_unary_special_recip_fp16_sisd(d, datasize, elements, esize, n)

Operation Sail

if elements == 1 then {
    CheckFPEnabled64()
} else {
    CheckFPAdvSIMDEnabled64()
};
let operand : bits('datasize) = V_read(n, datasize);
let fpcr : FPCRType = FPCR_read();
let merge : bool = elements == 1 & IsMerging(fpcr);
result : bits(128) = if merge then V_read(d, 128) else Zeros(128);
element : bits('esize) = undefined;
foreach (e from 0 to (elements - 1) by 1 in inc) {
    element = Elem_read(operand, e, esize);
    result = Elem_set(result, e, esize, FPRecipEstimate(element, FPCR_read()))
};
V_set(d, 128) = result

Made from ScarletNX's Sail at 166ad3910f80. sail-arm's definitions are Arm's ASL in Sail (BSD 3-Clause Clear, license); ScarletNX's fixups are GPL-3.0-or-later.