258 lines · plain
1// RUN: not llvm-mc -triple aarch64 \2// RUN: -mattr=+crc,+sm4,+sha3,+sha2,+aes,+fp,+neon,+ras,+lse,+predres,+ccdp,+mte,+tlb-rmi,+pan-rwv,+ccpp,+rcpc,+ls64,+flagm,+hbc,+mops \3// RUN: -mattr=+rcpc3,+lse128,+d128,+the,+rasv2,+ite,+cssc,+specres2,+gcs,+cmpbr \4// RUN: -filetype asm -o - %s 2>&1 | FileCheck %s5 6.arch_extension axp647// CHECK: error: unsupported architectural extension: axp648// CHECK-NEXT: .arch_extension axp649 10crc32cx w0, w1, x311// CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: crc12.arch_extension nocrc13crc32cx w0, w1, x314// CHECK: [[@LINE-1]]:1: error: instruction requires: crc15// CHECK-NEXT: crc32cx w0, w1, x316 17sm4e v2.4s, v15.4s18// CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: sm419.arch_extension nosm420sm4e v2.4s, v15.4s21// CHECK: [[@LINE-1]]:1: error: instruction requires: sm422// CHECK-NEXT: sm4e v2.4s, v15.4s23 24sha512h q0, q1, v2.2d25// CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: sha326.arch_extension nosha327sha512h q0, q1, v2.2d28// CHECK: [[@LINE-1]]:1: error: instruction requires: sha329// CHECK-NEXT: sha512h q0, q1, v2.2d30 31sha1h s0, s132// CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: sha233.arch_extension nosha234sha1h s0, s135// CHECK: [[@LINE-1]]:1: error: instruction requires: sha236// CHECK-NEXT: sha1h s0, s137 38aese v0.16b, v1.16b39// CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: aes40.arch_extension noaes41aese v0.16b, v1.16b42// CHECK: [[@LINE-1]]:1: error: instruction requires: aes43// CHECK-NEXT: aese v0.16b, v1.16b44 45fminnm d0, d0, d146// CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: fp47.arch_extension nofp48fminnm d0, d0, d149// CHECK: [[@LINE-1]]:1: error: instruction requires: fp50// CHECK-NEXT: fminnm d0, d0, d151 52// nofp implied nosimd, so reinstate it53.arch_extension simd54addp v0.4s, v0.4s, v0.4s55// CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: neon56.arch_extension nosimd57addp v0.4s, v0.4s, v0.4s58// CHECK: [[@LINE-1]]:1: error: instruction requires: neon59// CHECK-NEXT: addp v0.4s, v0.4s, v0.4s60 61esb62// CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: ras63.arch_extension noras64esb65// CHECK: [[@LINE-1]]:1: error: instruction requires: ras66// CHECK-NEXT: esb67 68casa w5, w7, [x20]69// CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: lse70.arch_extension nolse71casa w5, w7, [x20]72// CHECK: [[@LINE-1]]:1: error: instruction requires: lse73// CHECK-NEXT: casa w5, w7, [x20]74 75// nolse implied nolse128, so reinstate it76.arch_extension lse12877swpp x0, x2, [x3]78// CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: lse12879.arch_extension nolse12880swpp x0, x2, [x3]81// CHECK: [[@LINE-1]]:1: error: instruction requires: lse12882// CHECK-NEXT: swpp x0, x2, [x3]83 84cfp rctx, x085// CHECK-NOT: [[@LINE-1]]:5: error: CFPRCTX requires: predres86.arch_extension nopredres87cfp rctx, x088// CHECK: [[@LINE-1]]:5: error: CFPRCTX requires: predres89// CHECK-NEXT: cfp rctx, x090 91// nopredres implied nopredres2, so reinstate it92.arch_extension predres293cosp rctx, x094// CHECK-NOT: [[@LINE-1]]:6: error: COSP requires: predres295.arch_extension nopredres296cosp rctx, x097// CHECK: [[@LINE-1]]:6: error: COSP requires: predres298// CHECK-NEXT: cosp rctx, x099 100dc cvadp, x7101// CHECK-NOT: [[@LINE-1]]:4: error: DC CVADP requires: ccdp102.arch_extension noccdp103dc cvadp, x7104// CHECK: [[@LINE-1]]:4: error: DC CVADP requires: ccdp105// CHECK-NEXT: dc cvadp, x7106 107irg x0, x1108// CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: mte109.arch_extension nomte110irg x0, x1111// CHECK: [[@LINE-1]]:1: error: instruction requires: mte112// CHECK-NEXT: irg x0, x1113 114tlbi vmalle1os115// CHECK-NOT: [[@LINE-1]]:6: error: TLBI VMALLE1OS requires: tlb-rmi116.arch_extension notlb-rmi117tlbi vmalle1os118// CHECK: [[@LINE-1]]:6: error: TLBI VMALLE1OS requires: tlb-rmi119// CHECK-NEXT: tlbi vmalle1os120 121at s1e1wp, x2122// CHECK-NOT: [[@LINE-1]]:4: error: AT S1E1WP requires: pan-rwv123.arch_extension nopan-rwv124at s1e1wp, x2125// CHECK: [[@LINE-1]]:4: error: AT S1E1WP requires: pan-rwv126// CHECK-NEXT: at s1e1wp, x2127 128dc cvap, x7129// CHECK-NOT: [[@LINE-1]]:4: error: DC CVAP requires: ccpp130.arch_extension noccpp131dc cvap, x7132// CHECK: [[@LINE-1]]:4: error: DC CVAP requires: ccpp133// CHECK-NEXT: dc cvap, x7134 135ldapr x0, [x1]136// CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: rcpc137.arch_extension norcpc138ldapr x0, [x1]139// CHECK: [[@LINE-1]]:1: error: instruction requires: rcpc140// CHECK-NEXT: ldapr x0, [x1]141 142// norcpc implied norcpc3, so reinstate it143.arch_extension rcpc3144stilp w24, w0, [x16, #-8]!145// CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: rcpc3146.arch_extension norcpc3147stilp w24, w0, [x16, #-8]!148// CHECK: [[@LINE-1]]:1: error: instruction requires: rcpc3149// CHECK-NEXT: stilp w24, w0, [x16, #-8]!150 151ld64b x0, [x13]152// CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: ls64153.arch_extension nols64154ld64b x0, [x13]155// CHECK: [[@LINE-1]]:1: error: instruction requires: ls64156// CHECK-NEXT: ld64b x0, [x13]157 158cfinv159// CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: flagm160.arch_extension noflagm161cfinv162// CHECK: [[@LINE-1]]:1: error: instruction requires: flagm163// CHECK-NEXT: cfinv164 165lbl:166bc.eq lbl167// CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: hbc168.arch_extension nohbc169bc.eq lbl170// CHECK: [[@LINE-1]]:1: error: instruction requires: hbc171// CHECK-NEXT: bc.eq lbl172 173cpyfp [x0]!, [x1]!, x2!174// CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: mops175.arch_extension nomops176cpyfp [x0]!, [x1]!, x2!177// CHECK: [[@LINE-1]]:1: error: instruction requires: mops178// CHECK-NEXT: cpyfp [x0]!, [x1]!, x2!179 180// nolse128 implied nod128, so reinstate it181.arch_extension d128182// This needs to come before `.arch_extension nothe` as it uses an instruction183// that requires both the and d128184sysp #0, c2, c0, #0, x0, x1185rcwcasp x0, x1, x6, x7, [x4]186// CHECK-NOT: [[@LINE-2]]:1: error: instruction requires: d128187// CHECK-NOT: [[@LINE-2]]:1: error: instruction requires: d128188.arch_extension nod128189sysp #0, c2, c0, #0, x0, x1190rcwcasp x0, x1, x6, x7, [x4]191// CHECK: [[@LINE-2]]:1: error: instruction requires: d128192// CHECK-NEXT: sysp #0, c2, c0, #0, x0, x1193// CHECK: [[@LINE-3]]:1: error: instruction requires: d128194// CHECK-NEXT: rcwcasp x0, x1, x6, x7, [x4]195 196rcwswp x0, x1, [x2]197// CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: the198.arch_extension nothe199rcwswp x0, x1, [x2]200// CHECK: [[@LINE-1]]:1: error: instruction requires: the201// CHECK-NEXT: rcwswp x0, x1, [x2]202 203trcit x0204// CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: ite205.arch_extension noite206trcit x0207// CHECK: [[@LINE-1]]:1: error: instruction requires: ite208// CHECK-NEXT: trcit x0209 210umax x0, x1, x2211// CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: cssc212.arch_extension nocssc213umax x0, x1, x2214// CHECK: [[@LINE-1]]:1: error: instruction requires: cssc215// CHECK-NEXT: umax x0, x1, x2216 217// noras implied norasv2, so reinstate it218.arch_extension rasv2219mrs x0, ERXGSR_EL1220// CHECK-NOT: [[@LINE-1]]:9: error: expected readable system register221.arch_extension norasv2222mrs x0, ERXGSR_EL1223// CHECK: [[@LINE-1]]:9: error: expected readable system register224// CHECK-NEXT: mrs x0, ERXGSR_EL1225 226gcspushm x0227// CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: gcs228.arch_extension nogcs229gcspushm x0230// CHECK: [[@LINE-1]]:1: error: instruction requires: gcs231// CHECK-NEXT: gcspushm x0232 233cbhi x5, x5, #1020234// CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: cmpbr235.arch_extension nocmpbr236cbhi x5, x5, #1020237// CHECK: [[@LINE-1]]:1: error: instruction requires: cmpbr238// CHECK-NEXT: cbhi x5, x5, #1020239 240 241.arch_extension fprcvt242.arch_extension nofprcvt243fcvtmu s0, d1244// CHECK: [[@LINE-1]]:1: error: instruction requires: fprcvt245// CHECK-NEXT: fcvtmu s0, d1246 247.arch_extension f8f16mm248.arch_extension nof8f16mm249fmmla v2.8h, v1.16b, v0.16b250// CHECK: [[@LINE-1]]:1: error: instruction requires: f8f16mm251// CHECK-NEXT: fmmla v2.8h, v1.16b, v0.16b252 253.arch_extension f8f32mm254.arch_extension nof8f32mm255fmmla v2.4s, v1.16b, v0.16b256// CHECK: [[@LINE-1]]:1: error: instruction requires: f8f32mm257// CHECK-NEXT: fmmla v2.4s, v1.16b, v0.16b258