Index: llvm/trunk/lib/Target/AArch64/AArch64SVEInstrInfo.td =================================================================== --- llvm/trunk/lib/Target/AArch64/AArch64SVEInstrInfo.td +++ llvm/trunk/lib/Target/AArch64/AArch64SVEInstrInfo.td @@ -227,6 +227,18 @@ defm GLD1D : sve_mem_64b_gld_sv_32_scaled<0b1110, "ld1d", ZPR64ExtSXTW64, ZPR64ExtUXTW64>; defm GLDFF1D : sve_mem_64b_gld_sv_32_scaled<0b1111, "ldff1d", ZPR64ExtSXTW64, ZPR64ExtUXTW64>; + // Non-temporal contiguous loads (register + immediate) + defm LDNT1B_ZRI : sve_mem_cldnt_si<0b00, "ldnt1b", Z_b, ZPR8>; + defm LDNT1H_ZRI : sve_mem_cldnt_si<0b01, "ldnt1h", Z_h, ZPR16>; + defm LDNT1W_ZRI : sve_mem_cldnt_si<0b10, "ldnt1w", Z_s, ZPR32>; + defm LDNT1D_ZRI : sve_mem_cldnt_si<0b11, "ldnt1d", Z_d, ZPR64>; + + // Non-temporal contiguous loads (register + register) + defm LDNT1B_ZRR : sve_mem_cldnt_ss<0b00, "ldnt1b", Z_b, ZPR8, GPR64NoXZRshifted8>; + defm LDNT1H_ZRR : sve_mem_cldnt_ss<0b01, "ldnt1h", Z_h, ZPR16, GPR64NoXZRshifted16>; + defm LDNT1W_ZRR : sve_mem_cldnt_ss<0b10, "ldnt1w", Z_s, ZPR32, GPR64NoXZRshifted32>; + defm LDNT1D_ZRR : sve_mem_cldnt_ss<0b11, "ldnt1d", Z_d, ZPR64, GPR64NoXZRshifted64>; + // contiguous store with immediates defm ST1B_IMM : sve_mem_cst_si<0b00, 0b00, "st1b", Z_b, ZPR8>; defm ST1B_H_IMM : sve_mem_cst_si<0b00, 0b01, "st1b", Z_h, ZPR16>; @@ -265,6 +277,18 @@ defm ST3D_IMM : sve_mem_est_si<0b11, 0b10, ZZZ_d, "st3d", simm4s3>; defm ST4D_IMM : sve_mem_est_si<0b11, 0b11, ZZZZ_d, "st4d", simm4s4>; + // Non-temporal contiguous stores (register + immediate) + defm STNT1B_ZRI : sve_mem_cstnt_si<0b00, "stnt1b", Z_b, ZPR8>; + defm STNT1H_ZRI : sve_mem_cstnt_si<0b01, "stnt1h", Z_h, ZPR16>; + defm STNT1W_ZRI : sve_mem_cstnt_si<0b10, "stnt1w", Z_s, ZPR32>; + defm STNT1D_ZRI : sve_mem_cstnt_si<0b11, "stnt1d", Z_d, ZPR64>; + + // Non-temporal contiguous stores (register + register) + defm STNT1B_ZRR : sve_mem_cstnt_ss<0b00, "stnt1b", Z_b, ZPR8, GPR64NoXZRshifted8>; + defm STNT1H_ZRR : sve_mem_cstnt_ss<0b01, "stnt1h", Z_h, ZPR16, GPR64NoXZRshifted16>; + defm STNT1W_ZRR : sve_mem_cstnt_ss<0b10, "stnt1w", Z_s, ZPR32, GPR64NoXZRshifted32>; + defm STNT1D_ZRR : sve_mem_cstnt_ss<0b11, "stnt1d", Z_d, ZPR64, GPR64NoXZRshifted64>; + defm ZIP1_ZZZ : sve_int_perm_bin_perm_zz<0b000, "zip1">; defm ZIP2_ZZZ : sve_int_perm_bin_perm_zz<0b001, "zip2">; Index: llvm/trunk/lib/Target/AArch64/SVEInstrFormats.td =================================================================== --- llvm/trunk/lib/Target/AArch64/SVEInstrFormats.td +++ llvm/trunk/lib/Target/AArch64/SVEInstrFormats.td @@ -590,6 +590,69 @@ (!cast(NAME) zprty:$Zt, PPR3bAny:$Pg, GPR64sp:$Rn, gprty:$Rm), 0>; } +class sve_mem_cstnt_si msz, string asm, RegisterOperand VecList> +: I<(outs), (ins VecList:$Zt, PPR3bAny:$Pg, GPR64sp:$Rn, simm4s1:$imm4), + asm, "\t$Zt, $Pg, [$Rn, $imm4, mul vl]", + "", + []>, Sched<[]> { + bits<3> Pg; + bits<5> Rn; + bits<5> Zt; + bits<4> imm4; + let Inst{31-25} = 0b1110010; + let Inst{24-23} = msz; + let Inst{22-20} = 0b001; + let Inst{19-16} = imm4; + let Inst{15-13} = 0b111; + let Inst{12-10} = Pg; + let Inst{9-5} = Rn; + let Inst{4-0} = Zt; + + let mayStore = 1; +} + +multiclass sve_mem_cstnt_si msz, string asm, RegisterOperand listty, + ZPRRegOp zprty> { + def NAME : sve_mem_cstnt_si; + + def : InstAlias(NAME) zprty:$Zt, PPR3bAny:$Pg, GPR64sp:$Rn, 0), 0>; + def : InstAlias(NAME) zprty:$Zt, PPR3bAny:$Pg, GPR64sp:$Rn, simm4s1:$imm4), 0>; + def : InstAlias(NAME) listty:$Zt, PPR3bAny:$Pg, GPR64sp:$Rn, 0), 1>; +} + +class sve_mem_cstnt_ss_base msz, string asm, RegisterOperand listty, + RegisterOperand gprty> +: I<(outs), (ins listty:$Zt, PPR3bAny:$Pg, GPR64sp:$Rn, gprty:$Rm), + asm, "\t$Zt, $Pg, [$Rn, $Rm]", + "", + []>, Sched<[]> { + bits<3> Pg; + bits<5> Rm; + bits<5> Rn; + bits<5> Zt; + let Inst{31-25} = 0b1110010; + let Inst{24-23} = msz; + let Inst{22-21} = 0b00; + let Inst{20-16} = Rm; + let Inst{15-13} = 0b011; + let Inst{12-10} = Pg; + let Inst{9-5} = Rn; + let Inst{4-0} = Zt; + + let mayStore = 1; +} + +multiclass sve_mem_cstnt_ss msz, string asm, RegisterOperand listty, + ZPRRegOp zprty, RegisterOperand gprty> { + def NAME : sve_mem_cstnt_ss_base; + + def : InstAlias(NAME) zprty:$Zt, PPR3bAny:$Pg, GPR64sp:$Rn, gprty:$Rm), 0>; +} + //===----------------------------------------------------------------------===// // SVE Permute - Predicates Group //===----------------------------------------------------------------------===// @@ -666,6 +729,69 @@ ZPRRegOp zprty> : sve_mem_cld_si_base; +class sve_mem_cldnt_si_base msz, string asm, RegisterOperand VecList> +: I<(outs VecList:$Zt), (ins PPR3bAny:$Pg, GPR64sp:$Rn, simm4s1:$imm4), + asm, "\t$Zt, $Pg/z, [$Rn, $imm4, mul vl]", + "", + []>, Sched<[]> { + bits<5> Zt; + bits<3> Pg; + bits<5> Rn; + bits<4> imm4; + let Inst{31-25} = 0b1010010; + let Inst{24-23} = msz; + let Inst{22-20} = 0b000; + let Inst{19-16} = imm4; + let Inst{15-13} = 0b111; + let Inst{12-10} = Pg; + let Inst{9-5} = Rn; + let Inst{4-0} = Zt; + + let mayLoad = 1; +} + +multiclass sve_mem_cldnt_si msz, string asm, RegisterOperand listty, + ZPRRegOp zprty> { + def NAME : sve_mem_cldnt_si_base; + + def : InstAlias(NAME) zprty:$Zt, PPR3bAny:$Pg, GPR64sp:$Rn, 0), 0>; + def : InstAlias(NAME) zprty:$Zt, PPR3bAny:$Pg, GPR64sp:$Rn, simm4s1:$imm4), 0>; + def : InstAlias(NAME) listty:$Zt, PPR3bAny:$Pg, GPR64sp:$Rn, 0), 1>; +} + +class sve_mem_cldnt_ss_base msz, string asm, RegisterOperand VecList, + RegisterOperand gprty> +: I<(outs VecList:$Zt), (ins PPR3bAny:$Pg, GPR64sp:$Rn, gprty:$Rm), + asm, "\t$Zt, $Pg/z, [$Rn, $Rm]", + "", + []>, Sched<[]> { + bits<3> Pg; + bits<5> Rm; + bits<5> Rn; + bits<5> Zt; + let Inst{31-25} = 0b1010010; + let Inst{24-23} = msz; + let Inst{22-21} = 0b00; + let Inst{20-16} = Rm; + let Inst{15-13} = 0b110; + let Inst{12-10} = Pg; + let Inst{9-5} = Rn; + let Inst{4-0} = Zt; + + let mayLoad = 1; +} + +multiclass sve_mem_cldnt_ss msz, string asm, RegisterOperand listty, + ZPRRegOp zprty, RegisterOperand gprty> { + def NAME : sve_mem_cldnt_ss_base; + + def : InstAlias(NAME) zprty:$Zt, PPR3bAny:$Pg, GPR64sp:$Rn, gprty:$Rm), 0>; +} + class sve_mem_ldqr_si sz, string asm, RegisterOperand VecList> : I<(outs VecList:$Zt), (ins PPR3bAny:$Pg, GPR64sp:$Rn, simm4s16:$imm4), asm, "\t$Zt, $Pg/z, [$Rn, $imm4]", "", []>, Sched<[]> { Index: llvm/trunk/test/MC/AArch64/SVE/ldnt1b-diagnostics.s =================================================================== --- llvm/trunk/test/MC/AArch64/SVE/ldnt1b-diagnostics.s +++ llvm/trunk/test/MC/AArch64/SVE/ldnt1b-diagnostics.s @@ -0,0 +1,61 @@ +// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve 2>&1 < %s| FileCheck %s + +// --------------------------------------------------------------------------// +// Immediate out of lower bound [-8, 7]. + +ldnt1b z23.b, p0/z, [x13, #-9, MUL VL] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-8, 7]. +// CHECK-NEXT: ldnt1b z23.b, p0/z, [x13, #-9, MUL VL] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldnt1b z29.b, p0/z, [x3, #8, MUL VL] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-8, 7]. +// CHECK-NEXT: ldnt1b z29.b, p0/z, [x3, #8, MUL VL] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + + +// --------------------------------------------------------------------------// +// Invalid result type. + +ldnt1b z0.h, p0/z, [x0] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldnt1b z0.h, p0/z, [x0] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldnt1b z0.s, p0/z, [x0] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldnt1b z0.s, p0/z, [x0] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldnt1b z0.d, p0/z, [x0] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldnt1b z0.d, p0/z, [x0] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + + +// --------------------------------------------------------------------------// +// restricted predicate has range [0, 7]. + +ldnt1b z27.b, p8/z, [x0] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: restricted predicate has range [0, 7]. +// CHECK-NEXT: ldnt1b z27.b, p8/z, [x0] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + + +// --------------------------------------------------------------------------// +// Invalid vector list. + +ldnt1b { }, p0/z, [x1, #1, MUL VL] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: vector register expected +// CHECK-NEXT: ldnt1b { }, p0/z, [x1, #1, MUL VL] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldnt1b { z1.b, z2.b }, p0/z, [x1, #1, MUL VL] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand +// CHECK-NEXT: ldnt1b { z1.b, z2.b }, p0/z, [x1, #1, MUL VL] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldnt1b { v0.2d }, p0/z, [x1, #1, MUL VL] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand +// CHECK-NEXT: ldnt1b { v0.2d }, p0/z, [x1, #1, MUL VL] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: Index: llvm/trunk/test/MC/AArch64/SVE/ldnt1b.s =================================================================== --- llvm/trunk/test/MC/AArch64/SVE/ldnt1b.s +++ llvm/trunk/test/MC/AArch64/SVE/ldnt1b.s @@ -0,0 +1,38 @@ +// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve < %s \ +// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \ +// RUN: | FileCheck %s --check-prefix=CHECK-ERROR +// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \ +// RUN: | llvm-objdump -d -mattr=+sve - | FileCheck %s --check-prefix=CHECK-INST +// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \ +// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN + +ldnt1b z0.b, p0/z, [x0] +// CHECK-INST: ldnt1b { z0.b }, p0/z, [x0] +// CHECK-ENCODING: [0x00,0xe0,0x00,0xa4] +// CHECK-ERROR: instruction requires: sve +// CHECK-UNKNOWN: 00 e0 00 a4 + +ldnt1b { z0.b }, p0/z, [x0] +// CHECK-INST: ldnt1b { z0.b }, p0/z, [x0] +// CHECK-ENCODING: [0x00,0xe0,0x00,0xa4] +// CHECK-ERROR: instruction requires: sve +// CHECK-UNKNOWN: 00 e0 00 a4 + +ldnt1b { z23.b }, p3/z, [x13, #-8, mul vl] +// CHECK-INST: ldnt1b { z23.b }, p3/z, [x13, #-8, mul vl] +// CHECK-ENCODING: [0xb7,0xed,0x08,0xa4] +// CHECK-ERROR: instruction requires: sve +// CHECK-UNKNOWN: b7 ed 08 a4 + +ldnt1b { z21.b }, p5/z, [x10, #7, mul vl] +// CHECK-INST: ldnt1b { z21.b }, p5/z, [x10, #7, mul vl] +// CHECK-ENCODING: [0x55,0xf5,0x07,0xa4] +// CHECK-ERROR: instruction requires: sve +// CHECK-UNKNOWN: 55 f5 07 a4 + +ldnt1b { z0.b }, p0/z, [x0, x0] +// CHECK-INST: ldnt1b { z0.b }, p0/z, [x0, x0] +// CHECK-ENCODING: [0x00,0xc0,0x00,0xa4] +// CHECK-ERROR: instruction requires: sve +// CHECK-UNKNOWN: 00 c0 00 a4 Index: llvm/trunk/test/MC/AArch64/SVE/ldnt1d-diagnostics.s =================================================================== --- llvm/trunk/test/MC/AArch64/SVE/ldnt1d-diagnostics.s +++ llvm/trunk/test/MC/AArch64/SVE/ldnt1d-diagnostics.s @@ -0,0 +1,61 @@ +// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve 2>&1 < %s| FileCheck %s + +// --------------------------------------------------------------------------// +// Immediate out of lower bound [-8, 7]. + +ldnt1d z23.d, p0/z, [x13, #-9, MUL VL] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-8, 7]. +// CHECK-NEXT: ldnt1d z23.d, p0/z, [x13, #-9, MUL VL] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldnt1d z29.d, p0/z, [x3, #8, MUL VL] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-8, 7]. +// CHECK-NEXT: ldnt1d z29.d, p0/z, [x3, #8, MUL VL] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + + +// --------------------------------------------------------------------------// +// Invalid result type. + +ldnt1d z0.b, p0/z, [x0] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldnt1d z0.b, p0/z, [x0] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldnt1d z0.h, p0/z, [x0] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldnt1d z0.h, p0/z, [x0] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldnt1d z0.s, p0/z, [x0] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldnt1d z0.s, p0/z, [x0] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + + +// --------------------------------------------------------------------------// +// restricted predicate has range [0, 7]. + +ldnt1d z27.d, p8/z, [x0] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: restricted predicate has range [0, 7]. +// CHECK-NEXT: ldnt1d z27.d, p8/z, [x0] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + + +// --------------------------------------------------------------------------// +// Invalid vector list. + +ldnt1d { }, p0/z, [x1, #1, MUL VL] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: vector register expected +// CHECK-NEXT: ldnt1d { }, p0/z, [x1, #1, MUL VL] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldnt1d { z1.d, z2.d }, p0/z, [x1, #1, MUL VL] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand +// CHECK-NEXT: ldnt1d { z1.d, z2.d }, p0/z, [x1, #1, MUL VL] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldnt1d { v0.2d }, p0/z, [x1, #1, MUL VL] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand +// CHECK-NEXT: ldnt1d { v0.2d }, p0/z, [x1, #1, MUL VL] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: Index: llvm/trunk/test/MC/AArch64/SVE/ldnt1d.s =================================================================== --- llvm/trunk/test/MC/AArch64/SVE/ldnt1d.s +++ llvm/trunk/test/MC/AArch64/SVE/ldnt1d.s @@ -0,0 +1,38 @@ +// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve < %s \ +// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \ +// RUN: | FileCheck %s --check-prefix=CHECK-ERROR +// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \ +// RUN: | llvm-objdump -d -mattr=+sve - | FileCheck %s --check-prefix=CHECK-INST +// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \ +// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN + +ldnt1d z0.d, p0/z, [x0] +// CHECK-INST: ldnt1d { z0.d }, p0/z, [x0] +// CHECK-ENCODING: [0x00,0xe0,0x80,0xa5] +// CHECK-ERROR: instruction requires: sve +// CHECK-UNKNOWN: 00 e0 80 a5 + +ldnt1d { z0.d }, p0/z, [x0] +// CHECK-INST: ldnt1d { z0.d }, p0/z, [x0] +// CHECK-ENCODING: [0x00,0xe0,0x80,0xa5] +// CHECK-ERROR: instruction requires: sve +// CHECK-UNKNOWN: 00 e0 80 a5 + +ldnt1d { z23.d }, p3/z, [x13, #-8, mul vl] +// CHECK-INST: ldnt1d { z23.d }, p3/z, [x13, #-8, mul vl] +// CHECK-ENCODING: [0xb7,0xed,0x88,0xa5] +// CHECK-ERROR: instruction requires: sve +// CHECK-UNKNOWN: b7 ed 88 a5 + +ldnt1d { z21.d }, p5/z, [x10, #7, mul vl] +// CHECK-INST: ldnt1d { z21.d }, p5/z, [x10, #7, mul vl] +// CHECK-ENCODING: [0x55,0xf5,0x87,0xa5] +// CHECK-ERROR: instruction requires: sve +// CHECK-UNKNOWN: 55 f5 87 a5 + +ldnt1d { z0.d }, p0/z, [x0, x0, lsl #3] +// CHECK-INST: ldnt1d { z0.d }, p0/z, [x0, x0, lsl #3] +// CHECK-ENCODING: [0x00,0xc0,0x80,0xa5] +// CHECK-ERROR: instruction requires: sve +// CHECK-UNKNOWN: 00 c0 80 a5 Index: llvm/trunk/test/MC/AArch64/SVE/ldnt1h-diagnostics.s =================================================================== --- llvm/trunk/test/MC/AArch64/SVE/ldnt1h-diagnostics.s +++ llvm/trunk/test/MC/AArch64/SVE/ldnt1h-diagnostics.s @@ -0,0 +1,61 @@ +// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve 2>&1 < %s| FileCheck %s + +// --------------------------------------------------------------------------// +// Immediate out of lower bound [-8, 7]. + +ldnt1h z23.h, p0/z, [x13, #-9, MUL VL] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-8, 7]. +// CHECK-NEXT: ldnt1h z23.h, p0/z, [x13, #-9, MUL VL] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldnt1h z29.h, p0/z, [x3, #8, MUL VL] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-8, 7]. +// CHECK-NEXT: ldnt1h z29.h, p0/z, [x3, #8, MUL VL] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + + +// --------------------------------------------------------------------------// +// Invalid result type. + +ldnt1h z0.b, p0/z, [x0] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldnt1h z0.b, p0/z, [x0] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldnt1h z0.s, p0/z, [x0] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldnt1h z0.s, p0/z, [x0] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldnt1h z0.d, p0/z, [x0] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldnt1h z0.d, p0/z, [x0] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + + +// --------------------------------------------------------------------------// +// restricted predicate has range [0, 7]. + +ldnt1h z27.h, p8/z, [x0] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: restricted predicate has range [0, 7]. +// CHECK-NEXT: ldnt1h z27.h, p8/z, [x0] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + + +// --------------------------------------------------------------------------// +// Invalid vector list. + +ldnt1h { }, p0/z, [x1, #1, MUL VL] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: vector register expected +// CHECK-NEXT: ldnt1h { }, p0/z, [x1, #1, MUL VL] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldnt1h { z1.h, z2.h }, p0/z, [x1, #1, MUL VL] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand +// CHECK-NEXT: ldnt1h { z1.h, z2.h }, p0/z, [x1, #1, MUL VL] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldnt1h { v0.2d }, p0/z, [x1, #1, MUL VL] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand +// CHECK-NEXT: ldnt1h { v0.2d }, p0/z, [x1, #1, MUL VL] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: Index: llvm/trunk/test/MC/AArch64/SVE/ldnt1h.s =================================================================== --- llvm/trunk/test/MC/AArch64/SVE/ldnt1h.s +++ llvm/trunk/test/MC/AArch64/SVE/ldnt1h.s @@ -0,0 +1,38 @@ +// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve < %s \ +// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \ +// RUN: | FileCheck %s --check-prefix=CHECK-ERROR +// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \ +// RUN: | llvm-objdump -d -mattr=+sve - | FileCheck %s --check-prefix=CHECK-INST +// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \ +// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN + +ldnt1h z0.h, p0/z, [x0] +// CHECK-INST: ldnt1h { z0.h }, p0/z, [x0] +// CHECK-ENCODING: [0x00,0xe0,0x80,0xa4] +// CHECK-ERROR: instruction requires: sve +// CHECK-UNKNOWN: 00 e0 80 a4 + +ldnt1h { z0.h }, p0/z, [x0] +// CHECK-INST: ldnt1h { z0.h }, p0/z, [x0] +// CHECK-ENCODING: [0x00,0xe0,0x80,0xa4] +// CHECK-ERROR: instruction requires: sve +// CHECK-UNKNOWN: 00 e0 80 a4 + +ldnt1h { z23.h }, p3/z, [x13, #-8, mul vl] +// CHECK-INST: ldnt1h { z23.h }, p3/z, [x13, #-8, mul vl] +// CHECK-ENCODING: [0xb7,0xed,0x88,0xa4] +// CHECK-ERROR: instruction requires: sve +// CHECK-UNKNOWN: b7 ed 88 a4 + +ldnt1h { z21.h }, p5/z, [x10, #7, mul vl] +// CHECK-INST: ldnt1h { z21.h }, p5/z, [x10, #7, mul vl] +// CHECK-ENCODING: [0x55,0xf5,0x87,0xa4] +// CHECK-ERROR: instruction requires: sve +// CHECK-UNKNOWN: 55 f5 87 a4 + +ldnt1h { z0.h }, p0/z, [x0, x0, lsl #1] +// CHECK-INST: ldnt1h { z0.h }, p0/z, [x0, x0, lsl #1] +// CHECK-ENCODING: [0x00,0xc0,0x80,0xa4] +// CHECK-ERROR: instruction requires: sve +// CHECK-UNKNOWN: 00 c0 80 a4 Index: llvm/trunk/test/MC/AArch64/SVE/ldnt1w-diagnostics.s =================================================================== --- llvm/trunk/test/MC/AArch64/SVE/ldnt1w-diagnostics.s +++ llvm/trunk/test/MC/AArch64/SVE/ldnt1w-diagnostics.s @@ -0,0 +1,61 @@ +// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve 2>&1 < %s| FileCheck %s + +// --------------------------------------------------------------------------// +// Immediate out of lower bound [-8, 7]. + +ldnt1w z23.s, p0/z, [x13, #-9, MUL VL] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-8, 7]. +// CHECK-NEXT: ldnt1w z23.s, p0/z, [x13, #-9, MUL VL] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldnt1w z29.s, p0/z, [x3, #8, MUL VL] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-8, 7]. +// CHECK-NEXT: ldnt1w z29.s, p0/z, [x3, #8, MUL VL] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + + +// --------------------------------------------------------------------------// +// Invalid result type. + +ldnt1w z0.b, p0/z, [x0] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldnt1w z0.b, p0/z, [x0] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldnt1w z0.h, p0/z, [x0] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldnt1w z0.h, p0/z, [x0] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldnt1w z0.d, p0/z, [x0] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldnt1w z0.d, p0/z, [x0] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + + +// --------------------------------------------------------------------------// +// restricted predicate has range [0, 7]. + +ldnt1w z27.s, p8/z, [x0] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: restricted predicate has range [0, 7]. +// CHECK-NEXT: ldnt1w z27.s, p8/z, [x0] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + + +// --------------------------------------------------------------------------// +// Invalid vector list. + +ldnt1w { }, p0/z, [x1, #1, MUL VL] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: vector register expected +// CHECK-NEXT: ldnt1w { }, p0/z, [x1, #1, MUL VL] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldnt1w { z1.s, z2.s }, p0/z, [x1, #1, MUL VL] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand +// CHECK-NEXT: ldnt1w { z1.s, z2.s }, p0/z, [x1, #1, MUL VL] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldnt1w { v0.2d }, p0/z, [x1, #1, MUL VL] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand +// CHECK-NEXT: ldnt1w { v0.2d }, p0/z, [x1, #1, MUL VL] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: Index: llvm/trunk/test/MC/AArch64/SVE/ldnt1w.s =================================================================== --- llvm/trunk/test/MC/AArch64/SVE/ldnt1w.s +++ llvm/trunk/test/MC/AArch64/SVE/ldnt1w.s @@ -0,0 +1,38 @@ +// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve < %s \ +// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \ +// RUN: | FileCheck %s --check-prefix=CHECK-ERROR +// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \ +// RUN: | llvm-objdump -d -mattr=+sve - | FileCheck %s --check-prefix=CHECK-INST +// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \ +// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN + +ldnt1w z0.s, p0/z, [x0] +// CHECK-INST: ldnt1w { z0.s }, p0/z, [x0] +// CHECK-ENCODING: [0x00,0xe0,0x00,0xa5] +// CHECK-ERROR: instruction requires: sve +// CHECK-UNKNOWN: 00 e0 00 a5 + +ldnt1w { z0.s }, p0/z, [x0] +// CHECK-INST: ldnt1w { z0.s }, p0/z, [x0] +// CHECK-ENCODING: [0x00,0xe0,0x00,0xa5] +// CHECK-ERROR: instruction requires: sve +// CHECK-UNKNOWN: 00 e0 00 a5 + +ldnt1w { z23.s }, p3/z, [x13, #-8, mul vl] +// CHECK-INST: ldnt1w { z23.s }, p3/z, [x13, #-8, mul vl] +// CHECK-ENCODING: [0xb7,0xed,0x08,0xa5] +// CHECK-ERROR: instruction requires: sve +// CHECK-UNKNOWN: b7 ed 08 a5 + +ldnt1w { z21.s }, p5/z, [x10, #7, mul vl] +// CHECK-INST: ldnt1w { z21.s }, p5/z, [x10, #7, mul vl] +// CHECK-ENCODING: [0x55,0xf5,0x07,0xa5] +// CHECK-ERROR: instruction requires: sve +// CHECK-UNKNOWN: 55 f5 07 a5 + +ldnt1w { z0.s }, p0/z, [x0, x0, lsl #2] +// CHECK-INST: ldnt1w { z0.s }, p0/z, [x0, x0, lsl #2] +// CHECK-ENCODING: [0x00,0xc0,0x00,0xa5] +// CHECK-ERROR: instruction requires: sve +// CHECK-UNKNOWN: 00 c0 00 a5 Index: llvm/trunk/test/MC/AArch64/SVE/stnt1b-diagnostics.s =================================================================== --- llvm/trunk/test/MC/AArch64/SVE/stnt1b-diagnostics.s +++ llvm/trunk/test/MC/AArch64/SVE/stnt1b-diagnostics.s @@ -0,0 +1,66 @@ +// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve 2>&1 < %s| FileCheck %s + +// --------------------------------------------------------------------------// +// Immediate out of lower bound [-8, 7]. + +stnt1b z23.b, p0, [x13, #-9, MUL VL] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-8, 7]. +// CHECK-NEXT: stnt1b z23.b, p0, [x13, #-9, MUL VL] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +stnt1b z29.b, p0, [x3, #8, MUL VL] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-8, 7]. +// CHECK-NEXT: stnt1b z29.b, p0, [x3, #8, MUL VL] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + + +// --------------------------------------------------------------------------// +// Invalid source type. + +stnt1b z0.h, p0, [x0] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stnt1b z0.h, p0, [x0] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +stnt1b z0.s, p0, [x0] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stnt1b z0.s, p0, [x0] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +stnt1b z0.d, p0, [x0] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stnt1b z0.d, p0, [x0] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + + +// --------------------------------------------------------------------------// +// invalid predicate + +stnt1b z27.b, p8, [x0] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: restricted predicate has range [0, 7]. +// CHECK-NEXT: stnt1b z27.b, p8, [x0] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +stnt1b z0.h, p0/z, [x0] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stnt1b z0.h, p0/z, [x0] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + + +// --------------------------------------------------------------------------// +// Invalid vector list. + +stnt1b { }, p0, [x1, #1, MUL VL] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: vector register expected +// CHECK-NEXT: stnt1b { }, p0, [x1, #1, MUL VL] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +stnt1b { z1.b, z2.b }, p0, [x1, #1, MUL VL] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand +// CHECK-NEXT: stnt1b { z1.b, z2.b }, p0, [x1, #1, MUL VL] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +stnt1b { v0.2d }, p0, [x1, #1, MUL VL] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand +// CHECK-NEXT: stnt1b { v0.2d }, p0, [x1, #1, MUL VL] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: Index: llvm/trunk/test/MC/AArch64/SVE/stnt1b.s =================================================================== --- llvm/trunk/test/MC/AArch64/SVE/stnt1b.s +++ llvm/trunk/test/MC/AArch64/SVE/stnt1b.s @@ -0,0 +1,38 @@ +// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve < %s \ +// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \ +// RUN: | FileCheck %s --check-prefix=CHECK-ERROR +// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \ +// RUN: | llvm-objdump -d -mattr=+sve - | FileCheck %s --check-prefix=CHECK-INST +// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \ +// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN + +stnt1b z0.b, p0, [x0] +// CHECK-INST: stnt1b { z0.b }, p0, [x0] +// CHECK-ENCODING: [0x00,0xe0,0x10,0xe4] +// CHECK-ERROR: instruction requires: sve +// CHECK-UNKNOWN: 00 e0 10 e4 + +stnt1b { z0.b }, p0, [x0] +// CHECK-INST: stnt1b { z0.b }, p0, [x0] +// CHECK-ENCODING: [0x00,0xe0,0x10,0xe4] +// CHECK-ERROR: instruction requires: sve +// CHECK-UNKNOWN: 00 e0 10 e4 + +stnt1b { z23.b }, p3, [x13, #-8, mul vl] +// CHECK-INST: stnt1b { z23.b }, p3, [x13, #-8, mul vl] +// CHECK-ENCODING: [0xb7,0xed,0x18,0xe4] +// CHECK-ERROR: instruction requires: sve +// CHECK-UNKNOWN: b7 ed 18 e4 + +stnt1b { z21.b }, p5, [x10, #7, mul vl] +// CHECK-INST: stnt1b { z21.b }, p5, [x10, #7, mul vl] +// CHECK-ENCODING: [0x55,0xf5,0x17,0xe4] +// CHECK-ERROR: instruction requires: sve +// CHECK-UNKNOWN: 55 f5 17 e4 + +stnt1b { z0.b }, p0, [x0, x0] +// CHECK-INST: stnt1b { z0.b }, p0, [x0, x0] +// CHECK-ENCODING: [0x00,0x60,0x00,0xe4] +// CHECK-ERROR: instruction requires: sve +// CHECK-UNKNOWN: 00 60 00 e4 Index: llvm/trunk/test/MC/AArch64/SVE/stnt1d-diagnostics.s =================================================================== --- llvm/trunk/test/MC/AArch64/SVE/stnt1d-diagnostics.s +++ llvm/trunk/test/MC/AArch64/SVE/stnt1d-diagnostics.s @@ -0,0 +1,66 @@ +// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve 2>&1 < %s| FileCheck %s + +// --------------------------------------------------------------------------// +// Immediate out of lower bound [-8, 7]. + +stnt1d z23.d, p0, [x13, #-9, MUL VL] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-8, 7]. +// CHECK-NEXT: stnt1d z23.d, p0, [x13, #-9, MUL VL] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +stnt1d z29.d, p0, [x3, #8, MUL VL] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-8, 7]. +// CHECK-NEXT: stnt1d z29.d, p0, [x3, #8, MUL VL] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + + +// --------------------------------------------------------------------------// +// Invalid source type. + +stnt1d z0.b, p0, [x0] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stnt1d z0.b, p0, [x0] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +stnt1d z0.h, p0, [x0] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stnt1d z0.h, p0, [x0] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +stnt1d z0.s, p0, [x0] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stnt1d z0.s, p0, [x0] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + + +// --------------------------------------------------------------------------// +// invalid predicate + +stnt1d z27.d, p8, [x0] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: restricted predicate has range [0, 7]. +// CHECK-NEXT: stnt1d z27.d, p8, [x0] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +stnt1d z0.d, p0/z, [x0] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stnt1d z0.d, p0/z, [x0] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + + +// --------------------------------------------------------------------------// +// Invalid vector list. + +stnt1d { }, p0, [x1, #1, MUL VL] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: vector register expected +// CHECK-NEXT: stnt1d { }, p0, [x1, #1, MUL VL] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +stnt1d { z1.d, z2.d }, p0, [x1, #1, MUL VL] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand +// CHECK-NEXT: stnt1d { z1.d, z2.d }, p0, [x1, #1, MUL VL] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +stnt1d { v0.2d }, p0, [x1, #1, MUL VL] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand +// CHECK-NEXT: stnt1d { v0.2d }, p0, [x1, #1, MUL VL] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: Index: llvm/trunk/test/MC/AArch64/SVE/stnt1d.s =================================================================== --- llvm/trunk/test/MC/AArch64/SVE/stnt1d.s +++ llvm/trunk/test/MC/AArch64/SVE/stnt1d.s @@ -0,0 +1,38 @@ +// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve < %s \ +// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \ +// RUN: | FileCheck %s --check-prefix=CHECK-ERROR +// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \ +// RUN: | llvm-objdump -d -mattr=+sve - | FileCheck %s --check-prefix=CHECK-INST +// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \ +// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN + +stnt1d z0.d, p0, [x0] +// CHECK-INST: stnt1d { z0.d }, p0, [x0] +// CHECK-ENCODING: [0x00,0xe0,0x90,0xe5] +// CHECK-ERROR: instruction requires: sve +// CHECK-UNKNOWN: 00 e0 90 e5 + +stnt1d { z0.d }, p0, [x0] +// CHECK-INST: stnt1d { z0.d }, p0, [x0] +// CHECK-ENCODING: [0x00,0xe0,0x90,0xe5] +// CHECK-ERROR: instruction requires: sve +// CHECK-UNKNOWN: 00 e0 90 e5 + +stnt1d { z23.d }, p3, [x13, #-8, mul vl] +// CHECK-INST: stnt1d { z23.d }, p3, [x13, #-8, mul vl] +// CHECK-ENCODING: [0xb7,0xed,0x98,0xe5] +// CHECK-ERROR: instruction requires: sve +// CHECK-UNKNOWN: b7 ed 98 e5 + +stnt1d { z21.d }, p5, [x10, #7, mul vl] +// CHECK-INST: stnt1d { z21.d }, p5, [x10, #7, mul vl] +// CHECK-ENCODING: [0x55,0xf5,0x97,0xe5] +// CHECK-ERROR: instruction requires: sve +// CHECK-UNKNOWN: 55 f5 97 e5 + +stnt1d { z0.d }, p0, [x0, x0, lsl #3] +// CHECK-INST: stnt1d { z0.d }, p0, [x0, x0, lsl #3] +// CHECK-ENCODING: [0x00,0x60,0x80,0xe5] +// CHECK-ERROR: instruction requires: sve +// CHECK-UNKNOWN: 00 60 80 e5 Index: llvm/trunk/test/MC/AArch64/SVE/stnt1h-diagnostics.s =================================================================== --- llvm/trunk/test/MC/AArch64/SVE/stnt1h-diagnostics.s +++ llvm/trunk/test/MC/AArch64/SVE/stnt1h-diagnostics.s @@ -0,0 +1,66 @@ +// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve 2>&1 < %s| FileCheck %s + +// --------------------------------------------------------------------------// +// Immediate out of lower bound [-8, 7]. + +stnt1h z23.h, p0, [x13, #-9, MUL VL] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-8, 7]. +// CHECK-NEXT: stnt1h z23.h, p0, [x13, #-9, MUL VL] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +stnt1h z29.h, p0, [x3, #8, MUL VL] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-8, 7]. +// CHECK-NEXT: stnt1h z29.h, p0, [x3, #8, MUL VL] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + + +// --------------------------------------------------------------------------// +// Invalid source type. + +stnt1h z0.b, p0, [x0] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stnt1h z0.b, p0, [x0] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +stnt1h z0.s, p0, [x0] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stnt1h z0.s, p0, [x0] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +stnt1h z0.d, p0, [x0] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stnt1h z0.d, p0, [x0] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + + +// --------------------------------------------------------------------------// +// invalid predicate + +stnt1h z27.h, p8, [x0] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: restricted predicate has range [0, 7]. +// CHECK-NEXT: stnt1h z27.h, p8, [x0] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +stnt1h z0.h, p0/z, [x0] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stnt1h z0.h, p0/z, [x0] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + + +// --------------------------------------------------------------------------// +// Invalid vector list. + +stnt1h { }, p0, [x1, #1, MUL VL] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: vector register expected +// CHECK-NEXT: stnt1h { }, p0, [x1, #1, MUL VL] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +stnt1h { z1.h, z2.h }, p0, [x1, #1, MUL VL] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand +// CHECK-NEXT: stnt1h { z1.h, z2.h }, p0, [x1, #1, MUL VL] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +stnt1h { v0.2d }, p0, [x1, #1, MUL VL] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand +// CHECK-NEXT: stnt1h { v0.2d }, p0, [x1, #1, MUL VL] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: Index: llvm/trunk/test/MC/AArch64/SVE/stnt1h.s =================================================================== --- llvm/trunk/test/MC/AArch64/SVE/stnt1h.s +++ llvm/trunk/test/MC/AArch64/SVE/stnt1h.s @@ -0,0 +1,38 @@ +// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve < %s \ +// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \ +// RUN: | FileCheck %s --check-prefix=CHECK-ERROR +// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \ +// RUN: | llvm-objdump -d -mattr=+sve - | FileCheck %s --check-prefix=CHECK-INST +// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \ +// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN + +stnt1h z0.h, p0, [x0] +// CHECK-INST: stnt1h { z0.h }, p0, [x0] +// CHECK-ENCODING: [0x00,0xe0,0x90,0xe4] +// CHECK-ERROR: instruction requires: sve +// CHECK-UNKNOWN: 00 e0 90 e4 + +stnt1h { z0.h }, p0, [x0] +// CHECK-INST: stnt1h { z0.h }, p0, [x0] +// CHECK-ENCODING: [0x00,0xe0,0x90,0xe4] +// CHECK-ERROR: instruction requires: sve +// CHECK-UNKNOWN: 00 e0 90 e4 + +stnt1h { z23.h }, p3, [x13, #-8, mul vl] +// CHECK-INST: stnt1h { z23.h }, p3, [x13, #-8, mul vl] +// CHECK-ENCODING: [0xb7,0xed,0x98,0xe4] +// CHECK-ERROR: instruction requires: sve +// CHECK-UNKNOWN: b7 ed 98 e4 + +stnt1h { z21.h }, p5, [x10, #7, mul vl] +// CHECK-INST: stnt1h { z21.h }, p5, [x10, #7, mul vl] +// CHECK-ENCODING: [0x55,0xf5,0x97,0xe4] +// CHECK-ERROR: instruction requires: sve +// CHECK-UNKNOWN: 55 f5 97 e4 + +stnt1h { z0.h }, p0, [x0, x0, lsl #1] +// CHECK-INST: stnt1h { z0.h }, p0, [x0, x0, lsl #1] +// CHECK-ENCODING: [0x00,0x60,0x80,0xe4] +// CHECK-ERROR: instruction requires: sve +// CHECK-UNKNOWN: 00 60 80 e4 Index: llvm/trunk/test/MC/AArch64/SVE/stnt1w-diagnostics.s =================================================================== --- llvm/trunk/test/MC/AArch64/SVE/stnt1w-diagnostics.s +++ llvm/trunk/test/MC/AArch64/SVE/stnt1w-diagnostics.s @@ -0,0 +1,66 @@ +// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve 2>&1 < %s| FileCheck %s + +// --------------------------------------------------------------------------// +// Immediate out of lower bound [-8, 7]. + +stnt1w z23.s, p0, [x13, #-9, MUL VL] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-8, 7]. +// CHECK-NEXT: stnt1w z23.s, p0, [x13, #-9, MUL VL] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +stnt1w z29.s, p0, [x3, #8, MUL VL] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-8, 7]. +// CHECK-NEXT: stnt1w z29.s, p0, [x3, #8, MUL VL] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + + +// --------------------------------------------------------------------------// +// Invalid source type. + +stnt1w z0.b, p0, [x0] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stnt1w z0.b, p0, [x0] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +stnt1w z0.h, p0, [x0] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stnt1w z0.h, p0, [x0] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +stnt1w z0.d, p0, [x0] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stnt1w z0.d, p0, [x0] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + + +// --------------------------------------------------------------------------// +// invalid predicate + +stnt1w z27.s, p8, [x0] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: restricted predicate has range [0, 7]. +// CHECK-NEXT: stnt1w z27.s, p8, [x0] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +stnt1w z0.s, p0/z, [x0] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stnt1w z0.s, p0/z, [x0] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + + +// --------------------------------------------------------------------------// +// Invalid vector list. + +stnt1w { }, p0, [x1, #1, MUL VL] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: vector register expected +// CHECK-NEXT: stnt1w { }, p0, [x1, #1, MUL VL] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +stnt1w { z1.s, z2.s }, p0, [x1, #1, MUL VL] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand +// CHECK-NEXT: stnt1w { z1.s, z2.s }, p0, [x1, #1, MUL VL] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +stnt1w { v0.2d }, p0, [x1, #1, MUL VL] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand +// CHECK-NEXT: stnt1w { v0.2d }, p0, [x1, #1, MUL VL] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: Index: llvm/trunk/test/MC/AArch64/SVE/stnt1w.s =================================================================== --- llvm/trunk/test/MC/AArch64/SVE/stnt1w.s +++ llvm/trunk/test/MC/AArch64/SVE/stnt1w.s @@ -0,0 +1,38 @@ +// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve < %s \ +// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \ +// RUN: | FileCheck %s --check-prefix=CHECK-ERROR +// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \ +// RUN: | llvm-objdump -d -mattr=+sve - | FileCheck %s --check-prefix=CHECK-INST +// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \ +// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN + +stnt1w z0.s, p0, [x0] +// CHECK-INST: stnt1w { z0.s }, p0, [x0] +// CHECK-ENCODING: [0x00,0xe0,0x10,0xe5] +// CHECK-ERROR: instruction requires: sve +// CHECK-UNKNOWN: 00 e0 10 e5 + +stnt1w { z0.s }, p0, [x0] +// CHECK-INST: stnt1w { z0.s }, p0, [x0] +// CHECK-ENCODING: [0x00,0xe0,0x10,0xe5] +// CHECK-ERROR: instruction requires: sve +// CHECK-UNKNOWN: 00 e0 10 e5 + +stnt1w { z23.s }, p3, [x13, #-8, mul vl] +// CHECK-INST: stnt1w { z23.s }, p3, [x13, #-8, mul vl] +// CHECK-ENCODING: [0xb7,0xed,0x18,0xe5] +// CHECK-ERROR: instruction requires: sve +// CHECK-UNKNOWN: b7 ed 18 e5 + +stnt1w { z21.s }, p5, [x10, #7, mul vl] +// CHECK-INST: stnt1w { z21.s }, p5, [x10, #7, mul vl] +// CHECK-ENCODING: [0x55,0xf5,0x17,0xe5] +// CHECK-ERROR: instruction requires: sve +// CHECK-UNKNOWN: 55 f5 17 e5 + +stnt1w { z0.s }, p0, [x0, x0, lsl #2] +// CHECK-INST: stnt1w { z0.s }, p0, [x0, x0, lsl #2] +// CHECK-ENCODING: [0x00,0x60,0x00,0xe5] +// CHECK-ERROR: instruction requires: sve +// CHECK-UNKNOWN: 00 60 00 e5