195 lines · plain
1// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve < %s \2// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST3// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme < %s \4// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST5// RUN: not llvm-mc -triple=aarch64 -show-encoding < %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 -d --mattr=+sve - | FileCheck %s --check-prefix=CHECK-INST9// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \10// RUN: | llvm-objdump -d --mattr=-sve - | FileCheck %s --check-prefix=CHECK-UNKNOWN11 12 13 14orr z5.b, z5.b, #0xf915// CHECK-INST: orr z5.b, z5.b, #0xf916// CHECK-ENCODING: [0xa5,0x2e,0x00,0x05]17// CHECK-ERROR: instruction requires: sve or sme18// CHECK-UNKNOWN: 05002ea5 <unknown>19 20orr z23.h, z23.h, #0xfff921// CHECK-INST: orr z23.h, z23.h, #0xfff922// CHECK-ENCODING: [0xb7,0x6d,0x00,0x05]23// CHECK-ERROR: instruction requires: sve or sme24// CHECK-UNKNOWN: 05006db7 <unknown>25 26orr z0.s, z0.s, #0xfffffff927// CHECK-INST: orr z0.s, z0.s, #0xfffffff928// CHECK-ENCODING: [0xa0,0xeb,0x00,0x05]29// CHECK-ERROR: instruction requires: sve or sme30// CHECK-UNKNOWN: 0500eba0 <unknown>31 32orr z0.d, z0.d, #0xfffffffffffffff933// CHECK-INST: orr z0.d, z0.d, #0xfffffffffffffff934// CHECK-ENCODING: [0xa0,0xef,0x03,0x05]35// CHECK-ERROR: instruction requires: sve or sme36// CHECK-UNKNOWN: 0503efa0 <unknown>37 38orr z5.b, z5.b, #0x639// CHECK-INST: orr z5.b, z5.b, #0x640// CHECK-ENCODING: [0x25,0x3e,0x00,0x05]41// CHECK-ERROR: instruction requires: sve or sme42// CHECK-UNKNOWN: 05003e25 <unknown>43 44orr z23.h, z23.h, #0x645// CHECK-INST: orr z23.h, z23.h, #0x646// CHECK-ENCODING: [0x37,0x7c,0x00,0x05]47// CHECK-ERROR: instruction requires: sve or sme48// CHECK-UNKNOWN: 05007c37 <unknown>49 50orr z0.s, z0.s, #0x651// CHECK-INST: orr z0.s, z0.s, #0x652// CHECK-ENCODING: [0x20,0xf8,0x00,0x05]53// CHECK-ERROR: instruction requires: sve or sme54// CHECK-UNKNOWN: 0500f820 <unknown>55 56orr z0.d, z0.d, #0x657// CHECK-INST: orr z0.d, z0.d, #0x658// CHECK-ENCODING: [0x20,0xf8,0x03,0x05]59// CHECK-ERROR: instruction requires: sve or sme60// CHECK-UNKNOWN: 0503f820 <unknown>61 62orr z0.d, z0.d, z0.d // should use mov-alias63// CHECK-INST: mov z0.d, z0.d64// CHECK-ENCODING: [0x00,0x30,0x60,0x04]65// CHECK-ERROR: instruction requires: sve or sme66// CHECK-UNKNOWN: 04603000 <unknown>67 68orr z23.d, z13.d, z8.d // should not use mov-alias69// CHECK-INST: orr z23.d, z13.d, z8.d70// CHECK-ENCODING: [0xb7,0x31,0x68,0x04]71// CHECK-ERROR: instruction requires: sve or sme72// CHECK-UNKNOWN: 046831b7 <unknown>73 74orr z31.b, p7/m, z31.b, z31.b75// CHECK-INST: orr z31.b, p7/m, z31.b, z31.b76// CHECK-ENCODING: [0xff,0x1f,0x18,0x04]77// CHECK-ERROR: instruction requires: sve or sme78// CHECK-UNKNOWN: 04181fff <unknown>79 80orr z31.h, p7/m, z31.h, z31.h81// CHECK-INST: orr z31.h, p7/m, z31.h, z31.h82// CHECK-ENCODING: [0xff,0x1f,0x58,0x04]83// CHECK-ERROR: instruction requires: sve or sme84// CHECK-UNKNOWN: 04581fff <unknown>85 86orr z31.s, p7/m, z31.s, z31.s87// CHECK-INST: orr z31.s, p7/m, z31.s, z31.s88// CHECK-ENCODING: [0xff,0x1f,0x98,0x04]89// CHECK-ERROR: instruction requires: sve or sme90// CHECK-UNKNOWN: 04981fff <unknown>91 92orr z31.d, p7/m, z31.d, z31.d93// CHECK-INST: orr z31.d, p7/m, z31.d, z31.d94// CHECK-ENCODING: [0xff,0x1f,0xd8,0x04]95// CHECK-ERROR: instruction requires: sve or sme96// CHECK-UNKNOWN: 04d81fff <unknown>97 98orr p0.b, p0/z, p0.b, p1.b99// CHECK-INST: orr p0.b, p0/z, p0.b, p1.b100// CHECK-ENCODING: [0x00,0x40,0x81,0x25]101// CHECK-ERROR: instruction requires: sve or sme102// CHECK-UNKNOWN: 25814000 <unknown>103 104orr p0.b, p0/z, p0.b, p0.b105// CHECK-INST: mov p0.b, p0.b106// CHECK-ENCODING: [0x00,0x40,0x80,0x25]107// CHECK-ERROR: instruction requires: sve or sme108// CHECK-UNKNOWN: 25804000 <unknown>109 110orr p15.b, p15/z, p15.b, p15.b111// CHECK-INST: mov p15.b, p15.b112// CHECK-ENCODING: [0xef,0x7d,0x8f,0x25]113// CHECK-ERROR: instruction requires: sve or sme114// CHECK-UNKNOWN: 258f7def <unknown>115 116 117// --------------------------------------------------------------------------//118// Test aliases.119 120orr z0.s, z0.s, z0.s121// CHECK-INST: mov z0.d, z0.d122// CHECK-ENCODING: [0x00,0x30,0x60,0x04]123// CHECK-ERROR: instruction requires: sve or sme124// CHECK-UNKNOWN: 04603000 <unknown>125 126orr z0.h, z0.h, z0.h127// CHECK-INST: mov z0.d, z0.d128// CHECK-ENCODING: [0x00,0x30,0x60,0x04]129// CHECK-ERROR: instruction requires: sve or sme130// CHECK-UNKNOWN: 04603000 <unknown>131 132orr z0.b, z0.b, z0.b133// CHECK-INST: mov z0.d, z0.d134// CHECK-ENCODING: [0x00,0x30,0x60,0x04]135// CHECK-ERROR: instruction requires: sve or sme136// CHECK-UNKNOWN: 04603000 <unknown>137 138orr z23.s, z13.s, z8.s // should not use mov-alias139// CHECK-INST: orr z23.d, z13.d, z8.d140// CHECK-ENCODING: [0xb7,0x31,0x68,0x04]141// CHECK-ERROR: instruction requires: sve or sme142// CHECK-UNKNOWN: 046831b7 <unknown>143 144orr z23.h, z13.h, z8.h // should not use mov-alias145// CHECK-INST: orr z23.d, z13.d, z8.d146// CHECK-ENCODING: [0xb7,0x31,0x68,0x04]147// CHECK-ERROR: instruction requires: sve or sme148// CHECK-UNKNOWN: 046831b7 <unknown>149 150orr z23.b, z13.b, z8.b // should not use mov-alias151// CHECK-INST: orr z23.d, z13.d, z8.d152// CHECK-ENCODING: [0xb7,0x31,0x68,0x04]153// CHECK-ERROR: instruction requires: sve or sme154// CHECK-UNKNOWN: 046831b7 <unknown>155 156 157// --------------------------------------------------------------------------//158// Test compatibility with MOVPRFX instruction.159 160movprfx z4.d, p7/z, z6.d161// CHECK-INST: movprfx z4.d, p7/z, z6.d162// CHECK-ENCODING: [0xc4,0x3c,0xd0,0x04]163// CHECK-ERROR: instruction requires: sve or sme164// CHECK-UNKNOWN: 04d03cc4 <unknown>165 166orr z4.d, p7/m, z4.d, z31.d167// CHECK-INST: orr z4.d, p7/m, z4.d, z31.d168// CHECK-ENCODING: [0xe4,0x1f,0xd8,0x04]169// CHECK-ERROR: instruction requires: sve or sme170// CHECK-UNKNOWN: 04d81fe4 <unknown>171 172movprfx z4, z6173// CHECK-INST: movprfx z4, z6174// CHECK-ENCODING: [0xc4,0xbc,0x20,0x04]175// CHECK-ERROR: instruction requires: sve or sme176// CHECK-UNKNOWN: 0420bcc4 <unknown>177 178orr z4.d, p7/m, z4.d, z31.d179// CHECK-INST: orr z4.d, p7/m, z4.d, z31.d180// CHECK-ENCODING: [0xe4,0x1f,0xd8,0x04]181// CHECK-ERROR: instruction requires: sve or sme182// CHECK-UNKNOWN: 04d81fe4 <unknown>183 184movprfx z0, z7185// CHECK-INST: movprfx z0, z7186// CHECK-ENCODING: [0xe0,0xbc,0x20,0x04]187// CHECK-ERROR: instruction requires: sve or sme188// CHECK-UNKNOWN: 0420bce0 <unknown>189 190orr z0.d, z0.d, #0x6191// CHECK-INST: orr z0.d, z0.d, #0x6192// CHECK-ENCODING: [0x20,0xf8,0x03,0x05]193// CHECK-ERROR: instruction requires: sve or sme194// CHECK-UNKNOWN: 0503f820 <unknown>195