61 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 14ld1sw { z31.d }, p7/z, [sp, z31.d]15// CHECK-INST: ld1sw { z31.d }, p7/z, [sp, z31.d]16// CHECK-ENCODING: [0xff,0x9f,0x5f,0xc5]17// CHECK-ERROR: instruction requires: sve18// CHECK-UNKNOWN: c55f9fff <unknown>19 20ld1sw { z23.d }, p3/z, [x13, z8.d, lsl #2]21// CHECK-INST: ld1sw { z23.d }, p3/z, [x13, z8.d, lsl #2]22// CHECK-ENCODING: [0xb7,0x8d,0x68,0xc5]23// CHECK-ERROR: instruction requires: sve24// CHECK-UNKNOWN: c5688db7 <unknown>25 26ld1sw { z21.d }, p5/z, [x10, z21.d, uxtw]27// CHECK-INST: ld1sw { z21.d }, p5/z, [x10, z21.d, uxtw]28// CHECK-ENCODING: [0x55,0x15,0x15,0xc5]29// CHECK-ERROR: instruction requires: sve30// CHECK-UNKNOWN: c5151555 <unknown>31 32ld1sw { z21.d }, p5/z, [x10, z21.d, sxtw]33// CHECK-INST: ld1sw { z21.d }, p5/z, [x10, z21.d, sxtw]34// CHECK-ENCODING: [0x55,0x15,0x55,0xc5]35// CHECK-ERROR: instruction requires: sve36// CHECK-UNKNOWN: c5551555 <unknown>37 38ld1sw { z0.d }, p0/z, [x0, z0.d, uxtw #2]39// CHECK-INST: ld1sw { z0.d }, p0/z, [x0, z0.d, uxtw #2]40// CHECK-ENCODING: [0x00,0x00,0x20,0xc5]41// CHECK-ERROR: instruction requires: sve42// CHECK-UNKNOWN: c5200000 <unknown>43 44ld1sw { z0.d }, p0/z, [x0, z0.d, sxtw #2]45// CHECK-INST: ld1sw { z0.d }, p0/z, [x0, z0.d, sxtw #2]46// CHECK-ENCODING: [0x00,0x00,0x60,0xc5]47// CHECK-ERROR: instruction requires: sve48// CHECK-UNKNOWN: c5600000 <unknown>49 50ld1sw { z31.d }, p7/z, [z31.d, #124]51// CHECK-INST: ld1sw { z31.d }, p7/z, [z31.d, #124]52// CHECK-ENCODING: [0xff,0x9f,0x3f,0xc5]53// CHECK-ERROR: instruction requires: sve54// CHECK-UNKNOWN: c53f9fff <unknown>55 56ld1sw { z0.d }, p0/z, [z0.d]57// CHECK-INST: ld1sw { z0.d }, p0/z, [z0.d]58// CHECK-ENCODING: [0x00,0x80,0x20,0xc5]59// CHECK-ERROR: instruction requires: sve60// CHECK-UNKNOWN: c5208000 <unknown>61