pacib

Pointer Authentication Code (Inst B)

PACIB <Xd>, <Xn|SP>

Signs a pointer in Xd using Key B.

Pseudocode Operation

modifier ← Xn | SP
Xd ← AddPAC(Xd, modifier, key_b, instruction_key)

Example

PACIB x0, x1

Encoding

Binary Layout
1
31
1
30
0
29
11010110
28:21
00001
20:16
00
15:14
0
13
001
12:10
Rn
9:5
Rd
4:0
 
Format Data Processing
Opcode 0xDAC10400
Extension PAC (Security)

Operands

  • Xd
    Ptr
  • Xn
    Modifier

Related

Other forms of pacib

  • pacib Pointer Authentication Code for Instruction…

More in PAC (Security)

Reference

Instruction Forms

Encoding Instruction ISA Bit pattern
0xDAC10400 PACIB <Xd>, <Xn|SP> A64 1 | 1 | 0 | 11010110 | 00001 | 00 | 0 | 001 | Rn | Rd

Description

Pointer Authentication Code for Instruction address, using key B. This instruction computes and inserts a pointer authentication code for an instruction address, using a modifier and key B. The address is: The modifier is: If FEAT_PAuth_LR is implemented and PSTATE.PACM is 1, then PACIB1716 and PACIBSP include a second modifier that is: A PACIBSP instruction has an implicit BTI instruction. The implicit BTI instruction of a PACIBSP instruction is always compatible with PSTATE.BTYPE == 0b01 and PSTATE.BTYPE == 0b10. Controls in SCTLR_ELx configure whether the implicit BTI instruction of a PACIBSP instruction is compatible with PSTATE.BTYPE == 0b11. For more information, see PSTATE.BTYPE.

Operation

if IsFeatureImplemented(FEAT_PAuth) then
    if source_is_sp then
        if IsFeatureImplemented(FEAT_PAuth_LR) && PSTATE.PACM == '1' then
            X[d, 64] = AddPACIB2(X[d, 64], SP[], PC64);
        else
            X[d, 64] = AddPACIB(X[d, 64], SP[]);
    else
        if IsFeatureImplemented(FEAT_PAuth_LR) && PSTATE.PACM == '1' && pacib1716 then
            X[d, 64] = AddPACIB2(X[d, 64], X[n, 64], X[15, 64]);
        else
            X[d, 64] = AddPACIB(X[d, 64], X[n, 64]);