Skip to content

Commit d43fc5a

Browse files
pratlucasrgwott
andcommitted
Reland: [AArch64] Assembly support for the Checked Pointer Arithmetic Extension (llvm#73777)
This introduces assembly support for the Checked Pointer Arithmetic Extension (FEAT_CPA), annouced as part of the Armv9.5-A architecture version. The changes include: * New subtarget feature for FEAT_CPA * New scalar instruction for pointer arithmetic * ADDPT, SUBPT, MADDPT, and MSUBPT * New SVE instructions for pointer arithmetic * ADDPT (vectors, predicated), ADDPT (vectors, unpredicated) * SUBPT (vectors, predicated), SUBPT (vectors, unpredicated) * MADPT and MLAPT * New ID_AA64ISAR3_EL1 system register Mode details about the extension can be found at: * https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/arm-a-profile-architecture-developments-2023 * https://developer.arm.com/documentation/ddi0602/2023-09/ Co-authored-by: Rodolfo Wottrich <[email protected]>
1 parent 688fa35 commit d43fc5a

19 files changed

+337
-7
lines changed

clang/test/Driver/aarch64-v95a.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,8 @@
1313
// RUN: %clang -target aarch64_be -mbig-endian -march=armv9.5-a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV95A-BE %s
1414
// GENERICV95A-BE: "-cc1"{{.*}} "-triple" "aarch64_be{{.*}}" "-target-cpu" "generic" "-target-feature" "+neon" "-target-feature" "+v9.5a"
1515

16+
// ===== Features supported on aarch64 =====
17+
18+
// RUN: %clang -target aarch64 -march=armv9.5a+cpa -### -c %s 2>&1 | FileCheck -check-prefix=V95A-CPA %s
19+
// RUN: %clang -target aarch64 -march=armv9.5-a+cpa -### -c %s 2>&1 | FileCheck -check-prefix=V95A-CPA %s
20+
// V95A-CPA: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-cpu" "generic" "-target-feature" "+neon" "-target-feature" "+v9.5a" "-target-feature" "+cpa"

llvm/include/llvm/TargetParser/AArch64TargetParser.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ enum ArchExtKind : unsigned {
173173
AEK_SMEF8F16 = 69, // FEAT_SME_F8F16
174174
AEK_SMEF8F32 = 70, // FEAT_SME_F8F32
175175
AEK_SMEFA64 = 71, // FEAT_SME_FA64
176+
AEK_CPA = 72, // FEAT_CPA
176177
AEK_NUM_EXTENSIONS
177178
};
178179
using ExtensionBitset = Bitset<AEK_NUM_EXTENSIONS>;
@@ -295,6 +296,7 @@ inline constexpr ExtensionInfo Extensions[] = {
295296
{"sme-f8f16", AArch64::AEK_SMEF8F16, "+sme-f8f16", "-sme-f8f16", FEAT_INIT, "+sme2,+fp8", 0},
296297
{"sme-f8f32", AArch64::AEK_SMEF8F32, "+sme-f8f32", "-sme-f8f32", FEAT_INIT, "+sme2,+fp8", 0},
297298
{"sme-fa64", AArch64::AEK_SMEFA64, "+sme-fa64", "-sme-fa64", FEAT_INIT, "", 0},
299+
{"cpa", AArch64::AEK_CPA, "+cpa", "-cpa", FEAT_INIT, "", 0},
298300
// Special cases
299301
{"none", AArch64::AEK_NONE, {}, {}, FEAT_INIT, "", ExtensionInfo::MaxFMVPriority},
300302
};
@@ -378,7 +380,8 @@ inline constexpr ArchInfo ARMV9_3A = { VersionTuple{9, 3}, AProfile, "armv9.3-a
378380
AArch64::ExtensionBitset({AArch64::AEK_MOPS, AArch64::AEK_HBC}))};
379381
inline constexpr ArchInfo ARMV9_4A = { VersionTuple{9, 4}, AProfile, "armv9.4-a", "+v9.4a", (ARMV9_3A.DefaultExts |
380382
AArch64::ExtensionBitset({AArch64::AEK_SPECRES2, AArch64::AEK_CSSC, AArch64::AEK_RASv2}))};
381-
inline constexpr ArchInfo ARMV9_5A = { VersionTuple{9, 5}, AProfile, "armv9.5-a", "+v9.5a", (ARMV9_4A.DefaultExts)};
383+
inline constexpr ArchInfo ARMV9_5A = { VersionTuple{9, 5}, AProfile, "armv9.5-a", "+v9.5a", (ARMV9_4A.DefaultExts |
384+
AArch64::ExtensionBitset({AArch64::AEK_CPA}))};
382385
// For v8-R, we do not enable crypto and align with GCC that enables a more minimal set of optional architecture extensions.
383386
inline constexpr ArchInfo ARMV8R = { VersionTuple{8, 0}, RProfile, "armv8-r", "+v8r", (ARMV8_5A.DefaultExts |
384387
AArch64::ExtensionBitset({AArch64::AEK_SSBS,

llvm/lib/Target/AArch64/AArch64.td

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -622,6 +622,9 @@ def FeatureLdpAlignedOnly : SubtargetFeature<"ldp-aligned-only", "HasLdpAlignedO
622622
def FeatureStpAlignedOnly : SubtargetFeature<"stp-aligned-only", "HasStpAlignedOnly",
623623
"true", "In order to emit stp, first check if the store will be aligned to 2 * element_size">;
624624

625+
def FeatureCPA : SubtargetFeature<"cpa", "HasCPA", "true",
626+
"Enable ARMv9.5-A Checked Pointer Arithmetic (FEAT_CPA)">;
627+
625628
//===----------------------------------------------------------------------===//
626629
// Architectures.
627630
//
@@ -692,7 +695,7 @@ def HasV9_4aOps : SubtargetFeature<
692695

693696
def HasV9_5aOps : SubtargetFeature<
694697
"v9.5a", "HasV9_5aOps", "true", "Support ARM v9.5a instructions",
695-
[HasV9_4aOps]>;
698+
[HasV9_4aOps, FeatureCPA]>;
696699

697700
def HasV8_0rOps : SubtargetFeature<
698701
"v8r", "HasV8_0rOps", "true", "Support ARM v8r instructions",

llvm/lib/Target/AArch64/AArch64InstrFormats.td

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12446,6 +12446,58 @@ class SystemPXtI<bit L, string asm> :
1244612446
BaseSYSPEncoding<L, asm, "\t$op1, $Cn, $Cm, $op2, $Rt", (outs),
1244712447
(ins imm0_7:$op1, sys_cr_op:$Cn, sys_cr_op:$Cm, imm0_7:$op2, XSeqPairClassOperand:$Rt)>;
1244812448

12449+
//----------------------------------------------------------------------------
12450+
// 2023 Armv9.5 Extensions
12451+
//----------------------------------------------------------------------------
12452+
12453+
//---
12454+
// Checked Pointer Arithmetic (FEAT_CPA)
12455+
//---
12456+
12457+
def LSLImm3ShiftOperand : AsmOperandClass {
12458+
let SuperClasses = [ExtendOperandLSL64];
12459+
let Name = "LSLImm3Shift";
12460+
let RenderMethod = "addLSLImm3ShifterOperands";
12461+
let DiagnosticType = "AddSubLSLImm3ShiftLarge";
12462+
}
12463+
12464+
def lsl_imm3_shift_operand : Operand<i32> {
12465+
let PrintMethod = "printShifter";
12466+
let ParserMatchClass = LSLImm3ShiftOperand;
12467+
}
12468+
12469+
// Base CPA scalar add/subtract with lsl #imm3 shift
12470+
class BaseAddSubCPA<bit isSub, string asm> : I<(outs GPR64sp:$Rd),
12471+
(ins GPR64sp:$Rn, GPR64:$Rm, lsl_imm3_shift_operand:$shift_imm),
12472+
asm, "\t$Rd, $Rn, $Rm$shift_imm", "", []>, Sched<[]> {
12473+
bits<5> Rd;
12474+
bits<5> Rn;
12475+
bits<5> Rm;
12476+
bits<3> shift_imm;
12477+
let Inst{31} = 0b1;
12478+
let Inst{30} = isSub;
12479+
let Inst{29-21} = 0b011010000;
12480+
let Inst{20-16} = Rm;
12481+
let Inst{15-13} = 0b001;
12482+
let Inst{12-10} = shift_imm;
12483+
let Inst{9-5} = Rn;
12484+
let Inst{4-0} = Rd;
12485+
}
12486+
12487+
// Alias for CPA scalar add/subtract with no shift
12488+
class AddSubCPAAlias<string asm, Instruction inst>
12489+
: InstAlias<asm#"\t$Rd, $Rn, $Rm",
12490+
(inst GPR64sp:$Rd, GPR64sp:$Rn, GPR64:$Rm, 0)>;
12491+
12492+
multiclass AddSubCPA<bit isSub, string asm> {
12493+
def _shift : BaseAddSubCPA<isSub, asm>;
12494+
def _noshift : AddSubCPAAlias<asm, !cast<Instruction>(NAME#"_shift")>;
12495+
}
12496+
12497+
class MulAccumCPA<bit isSub, string asm>
12498+
: BaseMulAccum<isSub, 0b011, GPR64, GPR64, asm, []>, Sched<[]> {
12499+
let Inst{31} = 0b1;
12500+
}
1244912501

1245012502
//----------------------------------------------------------------------------
1245112503
// Allow the size specifier tokens to be upper case, not just lower.

llvm/lib/Target/AArch64/AArch64InstrInfo.td

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,8 @@ def HasCHK : Predicate<"Subtarget->hasCHK()">,
289289
AssemblerPredicateWithAll<(all_of FeatureCHK), "chk">;
290290
def HasGCS : Predicate<"Subtarget->hasGCS()">,
291291
AssemblerPredicateWithAll<(all_of FeatureGCS), "gcs">;
292+
def HasCPA : Predicate<"Subtarget->hasCPA()">,
293+
AssemblerPredicateWithAll<(all_of FeatureCPA), "cpa">;
292294
def IsLE : Predicate<"Subtarget->isLittleEndian()">;
293295
def IsBE : Predicate<"!Subtarget->isLittleEndian()">;
294296
def IsWindows : Predicate<"Subtarget->isTargetWindows()">;
@@ -9402,6 +9404,10 @@ let Predicates = [HasD128] in {
94029404
}
94039405
}
94049406

9407+
//===----------------------------===//
9408+
// 2023 Architecture Extensions:
9409+
//===----------------------------===//
9410+
94059411
let Predicates = [HasFP8] in {
94069412
defm F1CVTL : SIMDMixedTwoVectorFP8<0b00, "f1cvtl">;
94079413
defm F2CVTL : SIMDMixedTwoVectorFP8<0b01, "f2cvtl">;
@@ -9443,6 +9449,19 @@ let Predicates = [HasFP8DOT4] in {
94439449
defm FDOT : SIMDThreeSameVectorDOT4<"fdot">;
94449450
} // End let Predicates = [HasFP8DOT4]
94459451

9452+
//===----------------------------------------------------------------------===//
9453+
// Checked Pointer Arithmetic (FEAT_CPA)
9454+
//===----------------------------------------------------------------------===//
9455+
let Predicates = [HasCPA] in {
9456+
// Scalar add/subtract
9457+
defm ADDPT : AddSubCPA<0, "addpt">;
9458+
defm SUBPT : AddSubCPA<1, "subpt">;
9459+
9460+
// Scalar multiply-add/subtract
9461+
def MADDPT : MulAccumCPA<0, "maddpt">;
9462+
def MSUBPT : MulAccumCPA<1, "msubpt">;
9463+
}
9464+
94469465
include "AArch64InstrAtomics.td"
94479466
include "AArch64SVEInstrInfo.td"
94489467
include "AArch64SMEInstrInfo.td"

llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4183,3 +4183,24 @@ let Predicates = [HasSVE2orSME2, HasLUT] in {
41834183
// LUTI4 (two contiguous registers)
41844184
defm LUTI4_Z2ZZI : sve2_luti4_vector_vg2_index<"luti4">;
41854185
} // End HasSVE2orSME2, HasLUT
4186+
4187+
//===----------------------------------------------------------------------===//
4188+
// Checked Pointer Arithmetic (FEAT_CPA)
4189+
//===----------------------------------------------------------------------===//
4190+
let Predicates = [HasSVE, HasCPA] in {
4191+
// Add/subtract (vectors, unpredicated)
4192+
def ADD_ZZZ_CPA : sve_int_bin_cons_arit_0<0b11, 0b010, "addpt", ZPR64>;
4193+
def SUB_ZZZ_CPA : sve_int_bin_cons_arit_0<0b11, 0b011, "subpt", ZPR64>;
4194+
4195+
// Add/subtract (vectors, predicated)
4196+
let DestructiveInstType = DestructiveBinaryComm in {
4197+
def ADD_ZPmZ_CPA : sve_int_bin_pred_arit_log<0b11, 0b00, 0b100, "addpt", ZPR64>;
4198+
def SUB_ZPmZ_CPA : sve_int_bin_pred_arit_log<0b11, 0b00, 0b101, "subpt", ZPR64>;
4199+
}
4200+
4201+
// Multiply-add vectors, writing multiplicand
4202+
def MAD_CPA : sve_int_mad_cpa<"madpt">;
4203+
4204+
// Multiply-add vectors, writing addend
4205+
def MLA_CPA : sve_int_mla_cpa<"mlapt">;
4206+
}

llvm/lib/Target/AArch64/AArch64SchedA64FX.td

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ def A64FXModel : SchedMachineModel {
2121
let CompleteModel = 1;
2222

2323
list<Predicate> UnsupportedFeatures = !listconcat(SMEUnsupported.F, SVEUnsupported.F,
24-
[HasMTE, HasMatMulInt8, HasBF16, HasPAuth]);
24+
[HasMTE, HasMatMulInt8, HasBF16,
25+
HasPAuth, HasCPA]);
2526
let FullInstRWOverlapCheck = 0;
2627
}
2728

llvm/lib/Target/AArch64/AArch64SchedNeoverseN2.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def NeoverseN2Model : SchedMachineModel {
1919
let CompleteModel = 1;
2020

2121
list<Predicate> UnsupportedFeatures = !listconcat(SMEUnsupported.F,
22-
[HasSVE2p1]);
22+
[HasSVE2p1, HasCPA]);
2323
}
2424

2525
//===----------------------------------------------------------------------===//

llvm/lib/Target/AArch64/AArch64SchedNeoverseV1.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def NeoverseV1Model : SchedMachineModel {
2828

2929
list<Predicate> UnsupportedFeatures = !listconcat(SVE2Unsupported.F,
3030
SMEUnsupported.F,
31-
[HasMTE]);
31+
[HasMTE, HasCPA]);
3232
}
3333

3434
//===----------------------------------------------------------------------===//

llvm/lib/Target/AArch64/AArch64SchedNeoverseV2.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def NeoverseV2Model : SchedMachineModel {
2222
let CompleteModel = 1;
2323

2424
list<Predicate> UnsupportedFeatures = !listconcat(SMEUnsupported.F,
25-
[HasSVE2p1]);
25+
[HasSVE2p1, HasCPA]);
2626
}
2727

2828
//===----------------------------------------------------------------------===//

llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1541,6 +1541,13 @@ class AArch64Operand : public MCParsedAsmOperand {
15411541
getShiftExtendAmount() <= 4;
15421542
}
15431543

1544+
bool isLSLImm3Shift() const {
1545+
if (!isShiftExtend())
1546+
return false;
1547+
AArch64_AM::ShiftExtendType ET = getShiftExtendType();
1548+
return ET == AArch64_AM::LSL && getShiftExtendAmount() <= 7;
1549+
}
1550+
15441551
template<int Width> bool isMemXExtend() const {
15451552
if (!isExtend())
15461553
return false;
@@ -2091,6 +2098,12 @@ class AArch64Operand : public MCParsedAsmOperand {
20912098
Inst.addOperand(MCOperand::createImm(Imm));
20922099
}
20932100

2101+
void addLSLImm3ShifterOperands(MCInst &Inst, unsigned N) const {
2102+
assert(N == 1 && "Invalid number of operands!");
2103+
unsigned Imm = getShiftExtendAmount();
2104+
Inst.addOperand(MCOperand::createImm(Imm));
2105+
}
2106+
20942107
void addSyspXzrPairOperand(MCInst &Inst, unsigned N) const {
20952108
assert(N == 1 && "Invalid number of operands!");
20962109

@@ -3664,6 +3677,7 @@ static const struct Extension {
36643677
{"sme-f8f16", {AArch64::FeatureSMEF8F16}},
36653678
{"sme-f8f32", {AArch64::FeatureSMEF8F32}},
36663679
{"sme-fa64", {AArch64::FeatureSMEFA64}},
3680+
{"cpa", {AArch64::FeatureCPA}},
36673681
};
36683682

36693683
static void setRequiredFeatureString(FeatureBitset FBS, std::string &Str) {
@@ -6064,6 +6078,9 @@ bool AArch64AsmParser::showMatchError(SMLoc Loc, unsigned ErrCode,
60646078
"Invalid vector list, expected list with each SVE vector in the list "
60656079
"4 registers apart, and the first register in the range [z0, z3] or "
60666080
"[z16, z19] and with correct element type");
6081+
case Match_AddSubLSLImm3ShiftLarge:
6082+
return Error(Loc,
6083+
"expected 'lsl' with optional integer in range [0, 7]");
60676084
default:
60686085
llvm_unreachable("unexpected error code!");
60696086
}
@@ -6448,6 +6465,7 @@ bool AArch64AsmParser::MatchAndEmitInstruction(SMLoc IDLoc, unsigned &Opcode,
64486465
case Match_InvalidMemoryIndexed8:
64496466
case Match_InvalidMemoryIndexed16:
64506467
case Match_InvalidCondCode:
6468+
case Match_AddSubLSLImm3ShiftLarge:
64516469
case Match_AddSubRegExtendSmall:
64526470
case Match_AddSubRegExtendLarge:
64536471
case Match_AddSubSecondSource:

llvm/lib/Target/AArch64/SVEInstrFormats.td

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10433,3 +10433,34 @@ multiclass sve2_luti4_vector_vg2_index<string mnemonic> {
1043310433
let Inst{23-22} = idx;
1043410434
}
1043510435
}
10436+
10437+
//===----------------------------------------------------------------------===//
10438+
// Checked Pointer Arithmetic (FEAT_CPA)
10439+
//===----------------------------------------------------------------------===//
10440+
class sve_int_mad_cpa<string asm>
10441+
: I<(outs ZPR64:$Zdn), (ins ZPR64:$_Zdn, ZPR64:$Zm, ZPR64:$Za),
10442+
asm, "\t$Zdn, $Zm, $Za", "", []>, Sched<[]> {
10443+
bits<5> Zdn;
10444+
bits<5> Zm;
10445+
bits<5> Za;
10446+
let Inst{31-24} = 0b01000100;
10447+
let Inst{23-22} = 0b11; // sz
10448+
let Inst{21} = 0b0;
10449+
let Inst{20-16} = Zm;
10450+
let Inst{15} = 0b1;
10451+
let Inst{14-10} = 0b10110; // opc
10452+
let Inst{9-5} = Za;
10453+
let Inst{4-0} = Zdn;
10454+
10455+
let Constraints = "$Zdn = $_Zdn";
10456+
let DestructiveInstType = DestructiveOther;
10457+
let ElementSize = ZPR64.ElementSize;
10458+
let hasSideEffects = 0;
10459+
}
10460+
10461+
class sve_int_mla_cpa<string asm>
10462+
: sve2_int_mla<0b11, 0b10100, asm, ZPR64, ZPR64> {
10463+
let Inst{15} = 0b1;
10464+
10465+
let ElementSize = ZPR64.ElementSize;
10466+
}
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve -mattr=+cpa < %s \
2+
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
3+
// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sme -mattr=+cpa < %s 2>&1 \
4+
// RUN: | FileCheck %s --check-prefixes=CHECK-ERROR-NO-SVE
5+
// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
6+
// RUN: | FileCheck %s --check-prefix=CHECK-ERROR
7+
// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+cpa < %s 2>&1 \
8+
// RUN: | FileCheck %s --check-prefix=CHECK-ERROR-NO-SVE
9+
// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve < %s 2>&1 \
10+
// RUN: | FileCheck %s --check-prefix=CHECK-ERROR-NO-CPA
11+
// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sme < %s 2>&1 \
12+
// RUN: | FileCheck %s --check-prefix=CHECK-ERROR
13+
// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve -mattr=+cpa < %s \
14+
// RUN: | llvm-objdump -d --mattr=+sve --mattr=+cpa - \
15+
// RUN: | FileCheck %s --check-prefix=CHECK-INST
16+
// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve -mattr=+cpa < %s \
17+
// RUN: | llvm-objdump -d --mattr=+sve --mattr=-cpa - \
18+
// RUN: | FileCheck %s --check-prefix=CHECK-UNKNOWN
19+
// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve -mattr=+cpa < %s \
20+
// RUN: | llvm-objdump -d --mattr=-sve --mattr=+cpa - \
21+
// RUN: | FileCheck %s --check-prefix=CHECK-UNKNOWN
22+
23+
addpt z23.d, z13.d, z8.d
24+
// CHECK-INST: addpt z23.d, z13.d, z8.d
25+
// CHECK-ENCODING: [0xb7,0x09,0xe8,0x04]
26+
// CHECK-ERROR: instruction requires: cpa sve
27+
// CHECK-ERROR-NO-SVE: instruction requires: sve
28+
// CHECK-ERROR-NO-CPA: instruction requires: cpa
29+
// CHECK-UNKNOWN: 04e809b7 <unknown>
30+
31+
addpt z23.d, p3/m, z23.d, z13.d
32+
// CHECK-INST: addpt z23.d, p3/m, z23.d, z13.d
33+
// CHECK-ENCODING: [0xb7,0x0d,0xc4,0x04]
34+
// CHECK-ERROR: instruction requires: cpa sve
35+
// CHECK-ERROR-NO-SVE: instruction requires: sve
36+
// CHECK-ERROR-NO-CPA: instruction requires: cpa
37+
// CHECK-UNKNOWN: 04c40db7 <unknown>
38+
39+
subpt z23.d, z13.d, z8.d
40+
// CHECK-INST: subpt z23.d, z13.d, z8.d
41+
// CHECK-ENCODING: [0xb7,0x0d,0xe8,0x04]
42+
// CHECK-ERROR: instruction requires: cpa sve
43+
// CHECK-ERROR-NO-SVE: instruction requires: sve
44+
// CHECK-ERROR-NO-CPA: instruction requires: cpa
45+
// CHECK-UNKNOWN: 04e80db7 <unknown>
46+
47+
subpt z23.d, p3/m, z23.d, z13.d
48+
// CHECK-INST: subpt z23.d, p3/m, z23.d, z13.d
49+
// CHECK-ENCODING: [0xb7,0x0d,0xc5,0x04]
50+
// CHECK-ERROR: instruction requires: cpa sve
51+
// CHECK-ERROR-NO-SVE: instruction requires: sve
52+
// CHECK-ERROR-NO-CPA: instruction requires: cpa
53+
// CHECK-UNKNOWN: 04c50db7 <unknown>
54+
55+
madpt z0.d, z1.d, z31.d
56+
// CHECK-INST: madpt z0.d, z1.d, z31.d
57+
// CHECK-ENCODING: [0xe0,0xdb,0xc1,0x44]
58+
// CHECK-ERROR: instruction requires: cpa sve
59+
// CHECK-ERROR-NO-SVE: instruction requires: sve
60+
// CHECK-ERROR-NO-CPA: instruction requires: cpa
61+
// CHECK-UNKNOWN: 44c1dbe0 <unknown>
62+
63+
mlapt z0.d, z1.d, z31.d
64+
// CHECK-INST: mlapt z0.d, z1.d, z31.d
65+
// CHECK-ENCODING: [0x20,0xd0,0xdf,0x44]
66+
// CHECK-ERROR: instruction requires: cpa sve
67+
// CHECK-ERROR-NO-SVE: instruction requires: sve
68+
// CHECK-ERROR-NO-CPA: instruction requires: cpa
69+
// CHECK-UNKNOWN: 44dfd020 <unknown>

0 commit comments

Comments
 (0)