97 lines · plain
1// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve < %s \2// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST3// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \4// RUN: | FileCheck %s --check-prefix=CHECK-ERROR5// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sme < %s 2>&1 \6// RUN: | FileCheck %s --check-prefix=CHECK-ERROR7// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \8// RUN: | llvm-objdump --no-print-imm-hex -d --mattr=+sve - | FileCheck %s --check-prefix=CHECK-INST9// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \10// RUN: | llvm-objdump --no-print-imm-hex -d --mattr=-sve - | FileCheck %s --check-prefix=CHECK-UNKNOWN11 12// Test instruction variants that aren't legal in streaming mode.13 14ld1sh { z0.s }, p0/z, [x0, z0.s, uxtw]15// CHECK-INST: ld1sh { z0.s }, p0/z, [x0, z0.s, uxtw]16// CHECK-ENCODING: [0x00,0x00,0x80,0x84]17// CHECK-ERROR: instruction requires: sve18// CHECK-UNKNOWN: 84800000 <unknown>19 20ld1sh { z0.s }, p0/z, [x0, z0.s, sxtw]21// CHECK-INST: ld1sh { z0.s }, p0/z, [x0, z0.s, sxtw]22// CHECK-ENCODING: [0x00,0x00,0xc0,0x84]23// CHECK-ERROR: instruction requires: sve24// CHECK-UNKNOWN: 84c00000 <unknown>25 26ld1sh { z31.s }, p7/z, [sp, z31.s, uxtw #1]27// CHECK-INST: ld1sh { z31.s }, p7/z, [sp, z31.s, uxtw #1]28// CHECK-ENCODING: [0xff,0x1f,0xbf,0x84]29// CHECK-ERROR: instruction requires: sve30// CHECK-UNKNOWN: 84bf1fff <unknown>31 32ld1sh { z31.s }, p7/z, [sp, z31.s, sxtw #1]33// CHECK-INST: ld1sh { z31.s }, p7/z, [sp, z31.s, sxtw #1]34// CHECK-ENCODING: [0xff,0x1f,0xff,0x84]35// CHECK-ERROR: instruction requires: sve36// CHECK-UNKNOWN: 84ff1fff <unknown>37 38ld1sh { z31.d }, p7/z, [sp, z31.d]39// CHECK-INST: ld1sh { z31.d }, p7/z, [sp, z31.d]40// CHECK-ENCODING: [0xff,0x9f,0xdf,0xc4]41// CHECK-ERROR: instruction requires: sve42// CHECK-UNKNOWN: c4df9fff <unknown>43 44ld1sh { z23.d }, p3/z, [x13, z8.d, lsl #1]45// CHECK-INST: ld1sh { z23.d }, p3/z, [x13, z8.d, lsl #1]46// CHECK-ENCODING: [0xb7,0x8d,0xe8,0xc4]47// CHECK-ERROR: instruction requires: sve48// CHECK-UNKNOWN: c4e88db7 <unknown>49 50ld1sh { z21.d }, p5/z, [x10, z21.d, uxtw]51// CHECK-INST: ld1sh { z21.d }, p5/z, [x10, z21.d, uxtw]52// CHECK-ENCODING: [0x55,0x15,0x95,0xc4]53// CHECK-ERROR: instruction requires: sve54// CHECK-UNKNOWN: c4951555 <unknown>55 56ld1sh { z21.d }, p5/z, [x10, z21.d, sxtw]57// CHECK-INST: ld1sh { z21.d }, p5/z, [x10, z21.d, sxtw]58// CHECK-ENCODING: [0x55,0x15,0xd5,0xc4]59// CHECK-ERROR: instruction requires: sve60// CHECK-UNKNOWN: c4d51555 <unknown>61 62ld1sh { z0.d }, p0/z, [x0, z0.d, uxtw #1]63// CHECK-INST: ld1sh { z0.d }, p0/z, [x0, z0.d, uxtw #1]64// CHECK-ENCODING: [0x00,0x00,0xa0,0xc4]65// CHECK-ERROR: instruction requires: sve66// CHECK-UNKNOWN: c4a00000 <unknown>67 68ld1sh { z0.d }, p0/z, [x0, z0.d, sxtw #1]69// CHECK-INST: ld1sh { z0.d }, p0/z, [x0, z0.d, sxtw #1]70// CHECK-ENCODING: [0x00,0x00,0xe0,0xc4]71// CHECK-ERROR: instruction requires: sve72// CHECK-UNKNOWN: c4e00000 <unknown>73 74ld1sh { z31.s }, p7/z, [z31.s, #62]75// CHECK-INST: ld1sh { z31.s }, p7/z, [z31.s, #62]76// CHECK-ENCODING: [0xff,0x9f,0xbf,0x84]77// CHECK-ERROR: instruction requires: sve78// CHECK-UNKNOWN: 84bf9fff <unknown>79 80ld1sh { z0.s }, p0/z, [z0.s]81// CHECK-INST: ld1sh { z0.s }, p0/z, [z0.s]82// CHECK-ENCODING: [0x00,0x80,0xa0,0x84]83// CHECK-ERROR: instruction requires: sve84// CHECK-UNKNOWN: 84a08000 <unknown>85 86ld1sh { z31.d }, p7/z, [z31.d, #62]87// CHECK-INST: ld1sh { z31.d }, p7/z, [z31.d, #62]88// CHECK-ENCODING: [0xff,0x9f,0xbf,0xc4]89// CHECK-ERROR: instruction requires: sve90// CHECK-UNKNOWN: c4bf9fff <unknown>91 92ld1sh { z0.d }, p0/z, [z0.d]93// CHECK-INST: ld1sh { z0.d }, p0/z, [z0.d]94// CHECK-ENCODING: [0x00,0x80,0xa0,0xc4]95// CHECK-ERROR: instruction requires: sve96// CHECK-UNKNOWN: c4a08000 <unknown>97