136 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 13sqadd z0.b, z0.b, z0.b14// CHECK-INST: sqadd z0.b, z0.b, z0.b15// CHECK-ENCODING: [0x00,0x10,0x20,0x04]16// CHECK-ERROR: instruction requires: sve or sme17// CHECK-UNKNOWN: 04201000 <unknown>18 19sqadd z0.h, z0.h, z0.h20// CHECK-INST: sqadd z0.h, z0.h, z0.h21// CHECK-ENCODING: [0x00,0x10,0x60,0x04]22// CHECK-ERROR: instruction requires: sve or sme23// CHECK-UNKNOWN: 04601000 <unknown>24 25sqadd z0.s, z0.s, z0.s26// CHECK-INST: sqadd z0.s, z0.s, z0.s27// CHECK-ENCODING: [0x00,0x10,0xa0,0x04]28// CHECK-ERROR: instruction requires: sve or sme29// CHECK-UNKNOWN: 04a01000 <unknown>30 31sqadd z0.d, z0.d, z0.d32// CHECK-INST: sqadd z0.d, z0.d, z0.d33// CHECK-ENCODING: [0x00,0x10,0xe0,0x04]34// CHECK-ERROR: instruction requires: sve or sme35// CHECK-UNKNOWN: 04e01000 <unknown>36 37sqadd z0.b, z0.b, #038// CHECK-INST: sqadd z0.b, z0.b, #039// CHECK-ENCODING: [0x00,0xc0,0x24,0x25]40// CHECK-ERROR: instruction requires: sve or sme41// CHECK-UNKNOWN: 2524c000 <unknown>42 43sqadd z31.b, z31.b, #25544// CHECK-INST: sqadd z31.b, z31.b, #25545// CHECK-ENCODING: [0xff,0xdf,0x24,0x25]46// CHECK-ERROR: instruction requires: sve or sme47// CHECK-UNKNOWN: 2524dfff <unknown>48 49sqadd z0.h, z0.h, #050// CHECK-INST: sqadd z0.h, z0.h, #051// CHECK-ENCODING: [0x00,0xc0,0x64,0x25]52// CHECK-ERROR: instruction requires: sve or sme53// CHECK-UNKNOWN: 2564c000 <unknown>54 55sqadd z0.h, z0.h, #0, lsl #856// CHECK-INST: sqadd z0.h, z0.h, #0, lsl #857// CHECK-ENCODING: [0x00,0xe0,0x64,0x25]58// CHECK-ERROR: instruction requires: sve or sme59// CHECK-UNKNOWN: 2564e000 <unknown>60 61sqadd z31.h, z31.h, #255, lsl #862// CHECK-INST: sqadd z31.h, z31.h, #6528063// CHECK-ENCODING: [0xff,0xff,0x64,0x25]64// CHECK-ERROR: instruction requires: sve or sme65// CHECK-UNKNOWN: 2564ffff <unknown>66 67sqadd z31.h, z31.h, #6528068// CHECK-INST: sqadd z31.h, z31.h, #6528069// CHECK-ENCODING: [0xff,0xff,0x64,0x25]70// CHECK-ERROR: instruction requires: sve or sme71// CHECK-UNKNOWN: 2564ffff <unknown>72 73sqadd z0.s, z0.s, #074// CHECK-INST: sqadd z0.s, z0.s, #075// CHECK-ENCODING: [0x00,0xc0,0xa4,0x25]76// CHECK-ERROR: instruction requires: sve or sme77// CHECK-UNKNOWN: 25a4c000 <unknown>78 79sqadd z0.s, z0.s, #0, lsl #880// CHECK-INST: sqadd z0.s, z0.s, #0, lsl #881// CHECK-ENCODING: [0x00,0xe0,0xa4,0x25]82// CHECK-ERROR: instruction requires: sve or sme83// CHECK-UNKNOWN: 25a4e000 <unknown>84 85sqadd z31.s, z31.s, #255, lsl #886// CHECK-INST: sqadd z31.s, z31.s, #6528087// CHECK-ENCODING: [0xff,0xff,0xa4,0x25]88// CHECK-ERROR: instruction requires: sve or sme89// CHECK-UNKNOWN: 25a4ffff <unknown>90 91sqadd z31.s, z31.s, #6528092// CHECK-INST: sqadd z31.s, z31.s, #6528093// CHECK-ENCODING: [0xff,0xff,0xa4,0x25]94// CHECK-ERROR: instruction requires: sve or sme95// CHECK-UNKNOWN: 25a4ffff <unknown>96 97sqadd z0.d, z0.d, #098// CHECK-INST: sqadd z0.d, z0.d, #099// CHECK-ENCODING: [0x00,0xc0,0xe4,0x25]100// CHECK-ERROR: instruction requires: sve or sme101// CHECK-UNKNOWN: 25e4c000 <unknown>102 103sqadd z0.d, z0.d, #0, lsl #8104// CHECK-INST: sqadd z0.d, z0.d, #0, lsl #8105// CHECK-ENCODING: [0x00,0xe0,0xe4,0x25]106// CHECK-ERROR: instruction requires: sve or sme107// CHECK-UNKNOWN: 25e4e000 <unknown>108 109sqadd z31.d, z31.d, #255, lsl #8110// CHECK-INST: sqadd z31.d, z31.d, #65280111// CHECK-ENCODING: [0xff,0xff,0xe4,0x25]112// CHECK-ERROR: instruction requires: sve or sme113// CHECK-UNKNOWN: 25e4ffff <unknown>114 115sqadd z31.d, z31.d, #65280116// CHECK-INST: sqadd z31.d, z31.d, #65280117// CHECK-ENCODING: [0xff,0xff,0xe4,0x25]118// CHECK-ERROR: instruction requires: sve or sme119// CHECK-UNKNOWN: 25e4ffff <unknown>120 121 122// --------------------------------------------------------------------------//123// Test compatibility with MOVPRFX instruction.124 125movprfx z31, z6126// CHECK-INST: movprfx z31, z6127// CHECK-ENCODING: [0xdf,0xbc,0x20,0x04]128// CHECK-ERROR: instruction requires: sve or sme129// CHECK-UNKNOWN: 0420bcdf <unknown>130 131sqadd z31.d, z31.d, #65280132// CHECK-INST: sqadd z31.d, z31.d, #65280133// CHECK-ENCODING: [0xff,0xff,0xe4,0x25]134// CHECK-ERROR: instruction requires: sve or sme135// CHECK-UNKNOWN: 25e4ffff <unknown>136