ABS

Data processing (register)

fixed bit field field the encoding fixes should be

Integer arithmetic unary abs

313029282726252423222120191817161514131211109876543210
sf101101011000000001000RnRd

x101101011000000001000xxxxxxxxxx

Decode Sail

if not_bool(HaveCSSC()) then {
    throw(Error_Undefined())
};
let 'datasize = (32 << UInt(sf));
let 'n = UInt(Rn);
let 'd = UInt(Rd);
execute_aarch64_instrs_integer_arithmetic_unary_abs(d, datasize, n)

Operation Sail

let operand1 : bits('datasize) = X_read(n, datasize);
let 'result = Abs(SInt(operand1));
X_set(d, datasize) = result[datasize - 1 .. 0]

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.