160 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 --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 13subr z0.b, p0/m, z0.b, z0.b14// CHECK-INST: subr z0.b, p0/m, z0.b, z0.b15// CHECK-ENCODING: [0x00,0x00,0x03,0x04]16// CHECK-ERROR: instruction requires: sve or sme17// CHECK-UNKNOWN: 04030000 <unknown>18 19subr z0.h, p0/m, z0.h, z0.h20// CHECK-INST: subr z0.h, p0/m, z0.h, z0.h21// CHECK-ENCODING: [0x00,0x00,0x43,0x04]22// CHECK-ERROR: instruction requires: sve or sme23// CHECK-UNKNOWN: 04430000 <unknown>24 25subr z0.s, p0/m, z0.s, z0.s26// CHECK-INST: subr z0.s, p0/m, z0.s, z0.s27// CHECK-ENCODING: [0x00,0x00,0x83,0x04]28// CHECK-ERROR: instruction requires: sve or sme29// CHECK-UNKNOWN: 04830000 <unknown>30 31subr z0.d, p0/m, z0.d, z0.d32// CHECK-INST: subr z0.d, p0/m, z0.d, z0.d33// CHECK-ENCODING: [0x00,0x00,0xc3,0x04]34// CHECK-ERROR: instruction requires: sve or sme35// CHECK-UNKNOWN: 04c30000 <unknown>36 37subr z0.b, z0.b, #038// CHECK-INST: subr z0.b, z0.b, #039// CHECK-ENCODING: [0x00,0xc0,0x23,0x25]40// CHECK-ERROR: instruction requires: sve or sme41// CHECK-UNKNOWN: 2523c000 <unknown>42 43subr z31.b, z31.b, #25544// CHECK-INST: subr z31.b, z31.b, #25545// CHECK-ENCODING: [0xff,0xdf,0x23,0x25]46// CHECK-ERROR: instruction requires: sve or sme47// CHECK-UNKNOWN: 2523dfff <unknown>48 49subr z0.h, z0.h, #050// CHECK-INST: subr z0.h, z0.h, #051// CHECK-ENCODING: [0x00,0xc0,0x63,0x25]52// CHECK-ERROR: instruction requires: sve or sme53// CHECK-UNKNOWN: 2563c000 <unknown>54 55subr z0.h, z0.h, #0, lsl #856// CHECK-INST: subr z0.h, z0.h, #0, lsl #857// CHECK-ENCODING: [0x00,0xe0,0x63,0x25]58// CHECK-ERROR: instruction requires: sve or sme59// CHECK-UNKNOWN: 2563e000 <unknown>60 61subr z31.h, z31.h, #255, lsl #862// CHECK-INST: subr z31.h, z31.h, #6528063// CHECK-ENCODING: [0xff,0xff,0x63,0x25]64// CHECK-ERROR: instruction requires: sve or sme65// CHECK-UNKNOWN: 2563ffff <unknown>66 67subr z31.h, z31.h, #6528068// CHECK-INST: subr z31.h, z31.h, #6528069// CHECK-ENCODING: [0xff,0xff,0x63,0x25]70// CHECK-ERROR: instruction requires: sve or sme71// CHECK-UNKNOWN: 2563ffff <unknown>72 73subr z0.s, z0.s, #074// CHECK-INST: subr z0.s, z0.s, #075// CHECK-ENCODING: [0x00,0xc0,0xa3,0x25]76// CHECK-ERROR: instruction requires: sve or sme77// CHECK-UNKNOWN: 25a3c000 <unknown>78 79subr z0.s, z0.s, #0, lsl #880// CHECK-INST: subr z0.s, z0.s, #0, lsl #881// CHECK-ENCODING: [0x00,0xe0,0xa3,0x25]82// CHECK-ERROR: instruction requires: sve or sme83// CHECK-UNKNOWN: 25a3e000 <unknown>84 85subr z31.s, z31.s, #255, lsl #886// CHECK-INST: subr z31.s, z31.s, #6528087// CHECK-ENCODING: [0xff,0xff,0xa3,0x25]88// CHECK-ERROR: instruction requires: sve or sme89// CHECK-UNKNOWN: 25a3ffff <unknown>90 91subr z31.s, z31.s, #6528092// CHECK-INST: subr z31.s, z31.s, #6528093// CHECK-ENCODING: [0xff,0xff,0xa3,0x25]94// CHECK-ERROR: instruction requires: sve or sme95// CHECK-UNKNOWN: 25a3ffff <unknown>96 97subr z0.d, z0.d, #098// CHECK-INST: subr z0.d, z0.d, #099// CHECK-ENCODING: [0x00,0xc0,0xe3,0x25]100// CHECK-ERROR: instruction requires: sve or sme101// CHECK-UNKNOWN: 25e3c000 <unknown>102 103subr z0.d, z0.d, #0, lsl #8104// CHECK-INST: subr z0.d, z0.d, #0, lsl #8105// CHECK-ENCODING: [0x00,0xe0,0xe3,0x25]106// CHECK-ERROR: instruction requires: sve or sme107// CHECK-UNKNOWN: 25e3e000 <unknown>108 109subr z31.d, z31.d, #255, lsl #8110// CHECK-INST: subr z31.d, z31.d, #65280111// CHECK-ENCODING: [0xff,0xff,0xe3,0x25]112// CHECK-ERROR: instruction requires: sve or sme113// CHECK-UNKNOWN: 25e3ffff <unknown>114 115subr z31.d, z31.d, #65280116// CHECK-INST: subr z31.d, z31.d, #65280117// CHECK-ENCODING: [0xff,0xff,0xe3,0x25]118// CHECK-ERROR: instruction requires: sve or sme119// CHECK-UNKNOWN: 25e3ffff <unknown>120 121 122// --------------------------------------------------------------------------//123// Test compatibility with MOVPRFX instruction.124 125movprfx z5.d, p0/z, z7.d126// CHECK-INST: movprfx z5.d, p0/z, z7.d127// CHECK-ENCODING: [0xe5,0x20,0xd0,0x04]128// CHECK-ERROR: instruction requires: sve or sme129// CHECK-UNKNOWN: 04d020e5 <unknown>130 131subr z5.d, p0/m, z5.d, z0.d132// CHECK-INST: subr z5.d, p0/m, z5.d, z0.d133// CHECK-ENCODING: [0x05,0x00,0xc3,0x04]134// CHECK-ERROR: instruction requires: sve or sme135// CHECK-UNKNOWN: 04c30005 <unknown>136 137movprfx z5, z7138// CHECK-INST: movprfx z5, z7139// CHECK-ENCODING: [0xe5,0xbc,0x20,0x04]140// CHECK-ERROR: instruction requires: sve or sme141// CHECK-UNKNOWN: 0420bce5 <unknown>142 143subr z5.d, p0/m, z5.d, z0.d144// CHECK-INST: subr z5.d, p0/m, z5.d, z0.d145// CHECK-ENCODING: [0x05,0x00,0xc3,0x04]146// CHECK-ERROR: instruction requires: sve or sme147// CHECK-UNKNOWN: 04c30005 <unknown>148 149movprfx z31, z6150// CHECK-INST: movprfx z31, z6151// CHECK-ENCODING: [0xdf,0xbc,0x20,0x04]152// CHECK-ERROR: instruction requires: sve or sme153// CHECK-UNKNOWN: 0420bcdf <unknown>154 155subr z31.d, z31.d, #65280156// CHECK-INST: subr z31.d, z31.d, #65280157// CHECK-ENCODING: [0xff,0xff,0xe3,0x25]158// CHECK-ERROR: instruction requires: sve or sme159// CHECK-UNKNOWN: 25e3ffff <unknown>160