AUTDB

Data processing (register)

fixed bit field field the encoding fixes should be

Integer PAC autdb data processing 1 source

313029282726252423222120191817161514131211109876543210
110110101100000100Z111RnRd

110110101100000100x111xxxxxxxxxx

Decode Sail

source_is_sp : bool = false;
let 'd = UInt(Rd);
let 'n = UInt(Rn);
if not_bool(HavePACExt()) then {
    throw(Error_Undefined())
};
if Z == 0b0 then {
    if n == 31 then {
        source_is_sp = true
    };
    ()
} else {
    if n != 31 then {
        throw(Error_Undefined())
    };
    ()
};
execute_aarch64_instrs_integer_pac_autdb_dp_1src(d, n, source_is_sp)

Operation Sail

let auth_then_branch : bool = false;
if HavePACExt() then {
    if source_is_sp then {
        X_set(d, 64) = AuthDB(X_read(d, 64), SP_read(), auth_then_branch)
    } else {
        X_set(d, 64) = AuthDB(X_read(d, 64), X_read(n, 64), auth_then_branch)
    }
};
()

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.