Skip to content

Commit 7868033

Browse files
authored
[AArch64] Update AUTIxSPPC and RETAxSPPC instructions for registers (#98303)
As of the 2024.06 Arm Architecture release, the register variants of the AUTIxSPPC and RETAxSPPC instructions have been updated to be explicitly different to the immediate variant. The instructions now follow the format AUTIxSPPCR and RETAxSPPCR for the register variants, with the immediate variants keeping their current form. The Specs can be found at the following locations AUTIASPPCR: https://developer.arm.com/documentation/ddi0602/2024-06/Base-Instructions/AUTIASPPCR--Authenticate-return-address-using-key-A--using-a-register-?lang=en AUTIBSPPCR: https://developer.arm.com/documentation/ddi0602/2024-06/Base-Instructions/AUTIBSPPCR--Authenticate-return-address-using-key-B--using-a-register-?lang=en RETAASPPCR and RETABSPPCR: https://developer.arm.com/documentation/ddi0602/2024-06/Base-Instructions/RETAASPPCR--RETABSPPCR--Return-from-subroutine--with-enhanced-pointer-authentication-return-using-a-register-?lang=en
1 parent 0b15f89 commit 7868033

File tree

3 files changed

+28
-28
lines changed

3 files changed

+28
-28
lines changed

llvm/lib/Target/AArch64/AArch64InstrInfo.td

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1845,8 +1845,8 @@ let Predicates = [HasPAuthLR] in {
18451845
def AUTIASPPCi : SignAuthPCRel<0b00, "autiasppc">;
18461846
def AUTIBSPPCi : SignAuthPCRel<0b01, "autibsppc">;
18471847
// opcode2, opcode, asm
1848-
def AUTIASPPCr : SignAuthOneReg<0b00001, 0b100100, "autiasppc">;
1849-
def AUTIBSPPCr : SignAuthOneReg<0b00001, 0b100101, "autibsppc">;
1848+
def AUTIASPPCr : SignAuthOneReg<0b00001, 0b100100, "autiasppcr">;
1849+
def AUTIBSPPCr : SignAuthOneReg<0b00001, 0b100101, "autibsppcr">;
18501850
// opcode2, opcode, asm
18511851
def PACIA171615 : SignAuthFixedRegs<0b00001, 0b100010, "pacia171615">;
18521852
def PACIB171615 : SignAuthFixedRegs<0b00001, 0b100011, "pacib171615">;
@@ -1859,8 +1859,8 @@ let Predicates = [HasPAuthLR] in {
18591859
def RETAASPPCi : SignAuthReturnPCRel<0b000, 0b11111, "retaasppc">;
18601860
def RETABSPPCi : SignAuthReturnPCRel<0b001, 0b11111, "retabsppc">;
18611861
// op3, asm
1862-
def RETAASPPCr : SignAuthReturnReg<0b000010, "retaasppc">;
1863-
def RETABSPPCr : SignAuthReturnReg<0b000011, "retabsppc">;
1862+
def RETAASPPCr : SignAuthReturnReg<0b000010, "retaasppcr">;
1863+
def RETABSPPCr : SignAuthReturnReg<0b000011, "retabsppcr">;
18641864
}
18651865
def : InstAlias<"pacm", (PACM), 1>;
18661866
}

llvm/test/MC/AArch64/armv9.5a-pauthlr.s

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -70,30 +70,30 @@ label1:
7070
// CHECK-ERROR: instruction requires: pauth-lr
7171
// CHECK-UNKNOWN: f3bfffff <unknown>
7272

73-
autiasppc x0
74-
// CHECK-INST: autiasppc x0
75-
// CHECK-DISASS: autiasppc x0
73+
autiasppcr x0
74+
// CHECK-INST: autiasppcr x0
75+
// CHECK-DISASS: autiasppcr x0
7676
// CHECK-ENCODING: [0x1e,0x90,0xc1,0xda]
7777
// CHECK-ERROR: instruction requires: pauth-lr
7878
// CHECK-UNKNOWN: dac1901e <unknown>
7979

80-
autibsppc x1
81-
// CHECK-INST: autibsppc x1
82-
// CHECK-DISASS: autibsppc x1
80+
autibsppcr x1
81+
// CHECK-INST: autibsppcr x1
82+
// CHECK-DISASS: autibsppcr x1
8383
// CHECK-ENCODING: [0x3e,0x94,0xc1,0xda]
8484
// CHECK-ERROR: instruction requires: pauth-lr
8585
// CHECK-UNKNOWN: dac1943e <unknown>
8686

87-
autiasppc xzr
88-
// CHECK-INST: autiasppc xzr
89-
// CHECK-DISASS: autiasppc xzr
87+
autiasppcr xzr
88+
// CHECK-INST: autiasppcr xzr
89+
// CHECK-DISASS: autiasppcr xzr
9090
// CHECK-ENCODING: [0xfe,0x93,0xc1,0xda]
9191
// CHECK-ERROR: instruction requires: pauth-lr
9292
// CHECK-UNKNOWN: dac193fe <unknown>
9393

94-
autibsppc xzr
95-
// CHECK-INST: autibsppc xzr
96-
// CHECK-DISASS: autibsppc xzr
94+
autibsppcr xzr
95+
// CHECK-INST: autibsppcr xzr
96+
// CHECK-DISASS: autibsppcr xzr
9797
// CHECK-ENCODING: [0xfe,0x97,0xc1,0xda]
9898
// CHECK-ERROR: instruction requires: pauth-lr
9999
// CHECK-UNKNOWN: dac197fe <unknown>
@@ -156,16 +156,16 @@ label1:
156156
// CHECK-ERROR: instruction requires: pauth-lr
157157
// CHECK-UNKNOWN: 551fffff <unknown>
158158

159-
retaasppc x2
160-
// CHECK-INST: retaasppc x2
161-
// CHECK-DISASS: retaasppc x2
159+
retaasppcr x2
160+
// CHECK-INST: retaasppcr x2
161+
// CHECK-DISASS: retaasppcr x2
162162
// CHECK-ENCODING: [0xe2,0x0b,0x5f,0xd6]
163163
// CHECK-ERROR: instruction requires: pauth-lr
164164
// CHECK-UNKNOWN: d65f0be2 <unknown>
165165

166-
retabsppc x3
167-
// CHECK-INST: retabsppc x3
168-
// CHECK-DISASS: retabsppc x3
166+
retabsppcr x3
167+
// CHECK-INST: retabsppcr x3
168+
// CHECK-DISASS: retabsppcr x3
169169
// CHECK-ENCODING: [0xe3,0x0f,0x5f,0xd6]
170170
// CHECK-ERROR: instruction requires: pauth-lr
171171
// CHECK-UNKNOWN: d65f0fe3 <unknown>

llvm/test/MC/Disassembler/AArch64/armv9.5a-pauthlr.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,19 @@
3434
# NO-PAUTHLR: invalid instruction encoding
3535

3636
[0x1e,0x90,0xc1,0xda]
37-
# CHECK: autiasppc x0
37+
# CHECK: autiasppcr x0
3838
# NO-PAUTHLR: invalid instruction encoding
3939

4040
[0x3e,0x94,0xc1,0xda]
41-
# CHECK: autibsppc x1
41+
# CHECK: autibsppcr x1
4242
# NO-PAUTHLR: invalid instruction encoding
4343

4444
[0xfe,0x93,0xc1,0xda]
45-
# CHECK: autiasppc xzr
45+
# CHECK: autiasppcr xzr
4646
# NO-PAUTHLR: invalid instruction encoding
4747

4848
[0xfe,0x97,0xc1,0xda]
49-
# CHECK: autibsppc xzr
49+
# CHECK: autibsppcr xzr
5050
# NO-PAUTHLR: invalid instruction encoding
5151

5252
[0xfe,0x8b,0xc1,0xda]
@@ -82,11 +82,11 @@
8282
# NO-PAUTHLR: invalid instruction encoding
8383

8484
[0xe2,0x0b,0x5f,0xd6]
85-
# CHECK: retaasppc x2
85+
# CHECK: retaasppcr x2
8686
# NO-PAUTHLR: invalid instruction encoding
8787

8888
[0xe3,0x0f,0x5f,0xd6]
89-
# CHECK: retabsppc x3
89+
# CHECK: retabsppcr x3
9090
# NO-PAUTHLR: invalid instruction encoding
9191

9292
[0xff,0x24,0x03,0xd5]

0 commit comments

Comments
 (0)