FRECPX (vector)

Data processing (scalar floating-point and Advanced SIMD)

fixed bit field field the encoding fixes should be

Vector arithmetic unary special frecpx fp16

313029282726252423222120191817161514131211109876543210
0101111011111001111110RnRd

0101111011111001111110xxxxxxxxxx

Decode Sail

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

Vector arithmetic unary special frecpx

313029282726252423222120191817161514131211109876543210
010111101sz100001111110RnRd

010111101x100001111110xxxxxxxxxx

Decode Sail

let 'd = UInt(Rd);
let 'n = UInt(Rn);
let 'esize = (32 << UInt(sz));
execute_aarch64_instrs_vector_arithmetic_unary_special_frecpx_fp16(d, esize, n)

Operation Sail

CheckFPEnabled64();
let operand : bits('esize) = V_read(n, esize);
let fpcr : FPCRType = FPCR_read();
let merge : bool = IsMerging(fpcr);
result : bits(128) = if merge then V_read(d, 128) else Zeros(128);
result = Elem_set(result, 0, esize, FPRecpX(operand, fpcr));
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.