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 14ld1w { z0.s }, p0/z, [x0, z0.s, uxtw]15// CHECK-INST: ld1w { z0.s }, p0/z, [x0, z0.s, uxtw]16// CHECK-ENCODING: [0x00,0x40,0x00,0x85]17// CHECK-ERROR: instruction requires: sve18// CHECK-UNKNOWN: 85004000 <unknown>19 20ld1w { z0.s }, p0/z, [x0, z0.s, sxtw]21// CHECK-INST: ld1w { z0.s }, p0/z, [x0, z0.s, sxtw]22// CHECK-ENCODING: [0x00,0x40,0x40,0x85]23// CHECK-ERROR: instruction requires: sve24// CHECK-UNKNOWN: 85404000 <unknown>25 26ld1w { z31.s }, p7/z, [sp, z31.s, uxtw #2]27// CHECK-INST: ld1w { z31.s }, p7/z, [sp, z31.s, uxtw #2]28// CHECK-ENCODING: [0xff,0x5f,0x3f,0x85]29// CHECK-ERROR: instruction requires: sve30// CHECK-UNKNOWN: 853f5fff <unknown>31 32ld1w { z31.s }, p7/z, [sp, z31.s, sxtw #2]33// CHECK-INST: ld1w { z31.s }, p7/z, [sp, z31.s, sxtw #2]34// CHECK-ENCODING: [0xff,0x5f,0x7f,0x85]35// CHECK-ERROR: instruction requires: sve36// CHECK-UNKNOWN: 857f5fff <unknown>37 38ld1w { z31.d }, p7/z, [sp, z31.d]39// CHECK-INST: ld1w { z31.d }, p7/z, [sp, z31.d]40// CHECK-ENCODING: [0xff,0xdf,0x5f,0xc5]41// CHECK-ERROR: instruction requires: sve42// CHECK-UNKNOWN: c55fdfff <unknown>43 44ld1w { z23.d }, p3/z, [x13, z8.d, lsl #2]45// CHECK-INST: ld1w { z23.d }, p3/z, [x13, z8.d, lsl #2]46// CHECK-ENCODING: [0xb7,0xcd,0x68,0xc5]47// CHECK-ERROR: instruction requires: sve48// CHECK-UNKNOWN: c568cdb7 <unknown>49 50ld1w { z21.d }, p5/z, [x10, z21.d, uxtw]51// CHECK-INST: ld1w { z21.d }, p5/z, [x10, z21.d, uxtw]52// CHECK-ENCODING: [0x55,0x55,0x15,0xc5]53// CHECK-ERROR: instruction requires: sve54// CHECK-UNKNOWN: c5155555 <unknown>55 56ld1w { z21.d }, p5/z, [x10, z21.d, sxtw]57// CHECK-INST: ld1w { z21.d }, p5/z, [x10, z21.d, sxtw]58// CHECK-ENCODING: [0x55,0x55,0x55,0xc5]59// CHECK-ERROR: instruction requires: sve60// CHECK-UNKNOWN: c5555555 <unknown>61 62ld1w { z0.d }, p0/z, [x0, z0.d, uxtw #2]63// CHECK-INST: ld1w { z0.d }, p0/z, [x0, z0.d, uxtw #2]64// CHECK-ENCODING: [0x00,0x40,0x20,0xc5]65// CHECK-ERROR: instruction requires: sve66// CHECK-UNKNOWN: c5204000 <unknown>67 68ld1w { z0.d }, p0/z, [x0, z0.d, sxtw #2]69// CHECK-INST: ld1w { z0.d }, p0/z, [x0, z0.d, sxtw #2]70// CHECK-ENCODING: [0x00,0x40,0x60,0xc5]71// CHECK-ERROR: instruction requires: sve72// CHECK-UNKNOWN: c5604000 <unknown>73 74ld1w { z31.s }, p7/z, [z31.s, #124]75// CHECK-INST: ld1w { z31.s }, p7/z, [z31.s, #124]76// CHECK-ENCODING: [0xff,0xdf,0x3f,0x85]77// CHECK-ERROR: instruction requires: sve78// CHECK-UNKNOWN: 853fdfff <unknown>79 80ld1w { z0.s }, p0/z, [z0.s]81// CHECK-INST: ld1w { z0.s }, p0/z, [z0.s]82// CHECK-ENCODING: [0x00,0xc0,0x20,0x85]83// CHECK-ERROR: instruction requires: sve84// CHECK-UNKNOWN: 8520c000 <unknown>85 86ld1w { z31.d }, p7/z, [z31.d, #124]87// CHECK-INST: ld1w { z31.d }, p7/z, [z31.d, #124]88// CHECK-ENCODING: [0xff,0xdf,0x3f,0xc5]89// CHECK-ERROR: instruction requires: sve90// CHECK-UNKNOWN: c53fdfff <unknown>91 92ld1w { z0.d }, p0/z, [z0.d]93// CHECK-INST: ld1w { z0.d }, p0/z, [z0.d]94// CHECK-ENCODING: [0x00,0xc0,0x20,0xc5]95// CHECK-ERROR: instruction requires: sve96// CHECK-UNKNOWN: c520c000 <unknown>97