Skip to content

[AArch64] Update AUTIxSPPC and RETAxSPPC instructions for register va… #98303

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions llvm/lib/Target/AArch64/AArch64InstrInfo.td
Original file line number Diff line number Diff line change
Expand Up @@ -1845,8 +1845,8 @@ let Predicates = [HasPAuthLR] in {
def AUTIASPPCi : SignAuthPCRel<0b00, "autiasppc">;
def AUTIBSPPCi : SignAuthPCRel<0b01, "autibsppc">;
// opcode2, opcode, asm
def AUTIASPPCr : SignAuthOneReg<0b00001, 0b100100, "autiasppc">;
def AUTIBSPPCr : SignAuthOneReg<0b00001, 0b100101, "autibsppc">;
def AUTIASPPCr : SignAuthOneReg<0b00001, 0b100100, "autiasppcr">;
def AUTIBSPPCr : SignAuthOneReg<0b00001, 0b100101, "autibsppcr">;
// opcode2, opcode, asm
def PACIA171615 : SignAuthFixedRegs<0b00001, 0b100010, "pacia171615">;
def PACIB171615 : SignAuthFixedRegs<0b00001, 0b100011, "pacib171615">;
Expand All @@ -1859,8 +1859,8 @@ let Predicates = [HasPAuthLR] in {
def RETAASPPCi : SignAuthReturnPCRel<0b000, 0b11111, "retaasppc">;
def RETABSPPCi : SignAuthReturnPCRel<0b001, 0b11111, "retabsppc">;
// op3, asm
def RETAASPPCr : SignAuthReturnReg<0b000010, "retaasppc">;
def RETABSPPCr : SignAuthReturnReg<0b000011, "retabsppc">;
def RETAASPPCr : SignAuthReturnReg<0b000010, "retaasppcr">;
def RETABSPPCr : SignAuthReturnReg<0b000011, "retabsppcr">;
}
def : InstAlias<"pacm", (PACM), 1>;
}
Expand Down
36 changes: 18 additions & 18 deletions llvm/test/MC/AArch64/armv9.5a-pauthlr.s
Original file line number Diff line number Diff line change
Expand Up @@ -70,30 +70,30 @@ label1:
// CHECK-ERROR: instruction requires: pauth-lr
// CHECK-UNKNOWN: f3bfffff <unknown>

autiasppc x0
// CHECK-INST: autiasppc x0
// CHECK-DISASS: autiasppc x0
autiasppcr x0
// CHECK-INST: autiasppcr x0
// CHECK-DISASS: autiasppcr x0
// CHECK-ENCODING: [0x1e,0x90,0xc1,0xda]
// CHECK-ERROR: instruction requires: pauth-lr
// CHECK-UNKNOWN: dac1901e <unknown>

autibsppc x1
// CHECK-INST: autibsppc x1
// CHECK-DISASS: autibsppc x1
autibsppcr x1
// CHECK-INST: autibsppcr x1
// CHECK-DISASS: autibsppcr x1
// CHECK-ENCODING: [0x3e,0x94,0xc1,0xda]
// CHECK-ERROR: instruction requires: pauth-lr
// CHECK-UNKNOWN: dac1943e <unknown>

autiasppc xzr
// CHECK-INST: autiasppc xzr
// CHECK-DISASS: autiasppc xzr
autiasppcr xzr
// CHECK-INST: autiasppcr xzr
// CHECK-DISASS: autiasppcr xzr
// CHECK-ENCODING: [0xfe,0x93,0xc1,0xda]
// CHECK-ERROR: instruction requires: pauth-lr
// CHECK-UNKNOWN: dac193fe <unknown>

autibsppc xzr
// CHECK-INST: autibsppc xzr
// CHECK-DISASS: autibsppc xzr
autibsppcr xzr
// CHECK-INST: autibsppcr xzr
// CHECK-DISASS: autibsppcr xzr
// CHECK-ENCODING: [0xfe,0x97,0xc1,0xda]
// CHECK-ERROR: instruction requires: pauth-lr
// CHECK-UNKNOWN: dac197fe <unknown>
Expand Down Expand Up @@ -156,16 +156,16 @@ label1:
// CHECK-ERROR: instruction requires: pauth-lr
// CHECK-UNKNOWN: 551fffff <unknown>

retaasppc x2
// CHECK-INST: retaasppc x2
// CHECK-DISASS: retaasppc x2
retaasppcr x2
// CHECK-INST: retaasppcr x2
// CHECK-DISASS: retaasppcr x2
// CHECK-ENCODING: [0xe2,0x0b,0x5f,0xd6]
// CHECK-ERROR: instruction requires: pauth-lr
// CHECK-UNKNOWN: d65f0be2 <unknown>

retabsppc x3
// CHECK-INST: retabsppc x3
// CHECK-DISASS: retabsppc x3
retabsppcr x3
// CHECK-INST: retabsppcr x3
// CHECK-DISASS: retabsppcr x3
// CHECK-ENCODING: [0xe3,0x0f,0x5f,0xd6]
// CHECK-ERROR: instruction requires: pauth-lr
// CHECK-UNKNOWN: d65f0fe3 <unknown>
Expand Down
12 changes: 6 additions & 6 deletions llvm/test/MC/Disassembler/AArch64/armv9.5a-pauthlr.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,19 @@
# NO-PAUTHLR: invalid instruction encoding

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

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

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

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

[0xfe,0x8b,0xc1,0xda]
Expand Down Expand Up @@ -82,11 +82,11 @@
# NO-PAUTHLR: invalid instruction encoding

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

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

[0xff,0x24,0x03,0xd5]
Expand Down
Loading