autia
Authenticate Code (Inst A)
AUTIA <Xd>, <Xn|SP>
Authenticates a pointer signed with Key A. Corrupts pointer if failed.
Details
Authenticates a 64-bit pointer in Xd using Key A and a modifier from Xn or SP. If authentication fails, the pointer is corrupted with a known bit pattern. This instruction is AArch64-only and requires the PAC (Pointer Authentication Code) extension. It does not affect the condition flags (N, Z, C, V) but may generate an exception if executed in an inappropriate context.
Pseudocode Operation
authenticated_pointer ← AuthenticatePointer(Xd, Xn, KeyA)
if authentication_fails then
Xd ← corrupted_value
else
Xd ← authenticated_pointer
end if
Example
AUTIA x0, x1
Encoding
Binary Layout
1
1
0
11010110
00001
00
0
100
Rn
Rd
Operands
-
Xd
Ptr -
Xn
Modifier
Reference (Arm A64 ISA)
Instruction Forms
| Encoding | Instruction | ISA | Bit pattern | ||
|---|---|---|---|---|---|
| 0xDAC11000 | AUTIA <Xd>, <Xn|SP> | A64 | 1 | 1 | 0 | 11010110 | 00001 | 00 | 0 | 100 | Rn | Rd |
Description
Authenticate Instruction address, using key A. This instruction authenticates an instruction address, using a modifier and key A.
If the authentication passes, the upper bits of the address are restored to enable subsequent use of the address. For information on behavior if the authentication fails, see Faulting on pointer authentication.
The address is:
The modifier is:
If FEAT_PAuth_LR is implemented and PSTATE.PACM is 1, then AUTIA1716 and AUTIASP include a second modifier that is:
Operation
if IsFeatureImplemented(FEAT_PAuth) then
if source_is_sp then
if IsFeatureImplemented(FEAT_PAuth_LR) && PSTATE.PACM == '1' then
X[d, 64] = AuthIA2(X[d, 64], SP[], X[16, 64], FALSE);
else
X[d, 64] = AuthIA(X[d, 64], SP[], FALSE);
else
if IsFeatureImplemented(FEAT_PAuth_LR) && PSTATE.PACM == '1' && autia1716 then
X[d, 64] = AuthIA2(X[d, 64], X[n, 64], X[15, 64], FALSE);
else
X[d, 64] = AuthIA(X[d, 64], X[n, 64], FALSE);