134 lines · plain
1// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 < %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=+sve2 < %s \8// RUN: | llvm-objdump --no-print-imm-hex -d --mattr=+sve2 - | FileCheck %s --check-prefix=CHECK-INST9// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \10// RUN: | llvm-objdump --no-print-imm-hex -d --mattr=-sve2 - | FileCheck %s --check-prefix=CHECK-UNKNOWN11 12sqshl z0.b, p0/m, z0.b, z1.b13// CHECK-INST: sqshl z0.b, p0/m, z0.b, z1.b14// CHECK-ENCODING: [0x20,0x80,0x08,0x44]15// CHECK-ERROR: instruction requires: sve2 or sme16// CHECK-UNKNOWN: 44088020 <unknown>17 18sqshl z0.h, p0/m, z0.h, z1.h19// CHECK-INST: sqshl z0.h, p0/m, z0.h, z1.h20// CHECK-ENCODING: [0x20,0x80,0x48,0x44]21// CHECK-ERROR: instruction requires: sve2 or sme22// CHECK-UNKNOWN: 44488020 <unknown>23 24sqshl z29.s, p7/m, z29.s, z30.s25// CHECK-INST: sqshl z29.s, p7/m, z29.s, z30.s26// CHECK-ENCODING: [0xdd,0x9f,0x88,0x44]27// CHECK-ERROR: instruction requires: sve2 or sme28// CHECK-UNKNOWN: 44889fdd <unknown>29 30sqshl z31.d, p7/m, z31.d, z30.d31// CHECK-INST: sqshl z31.d, p7/m, z31.d, z30.d32// CHECK-ENCODING: [0xdf,0x9f,0xc8,0x44]33// CHECK-ERROR: instruction requires: sve2 or sme34// CHECK-UNKNOWN: 44c89fdf <unknown>35 36sqshl z0.b, p0/m, z0.b, #037// CHECK-INST: sqshl z0.b, p0/m, z0.b, #038// CHECK-ENCODING: [0x00,0x81,0x06,0x04]39// CHECK-ERROR: instruction requires: sve2 or sme40// CHECK-UNKNOWN: 04068100 <unknown>41 42sqshl z31.b, p0/m, z31.b, #743// CHECK-INST: sqshl z31.b, p0/m, z31.b, #744// CHECK-ENCODING: [0xff,0x81,0x06,0x04]45// CHECK-ERROR: instruction requires: sve2 or sme46// CHECK-UNKNOWN: 040681ff <unknown>47 48sqshl z0.h, p0/m, z0.h, #049// CHECK-INST: sqshl z0.h, p0/m, z0.h, #050// CHECK-ENCODING: [0x00,0x82,0x06,0x04]51// CHECK-ERROR: instruction requires: sve2 or sme52// CHECK-UNKNOWN: 04068200 <unknown>53 54sqshl z31.h, p0/m, z31.h, #1555// CHECK-INST: sqshl z31.h, p0/m, z31.h, #1556// CHECK-ENCODING: [0xff,0x83,0x06,0x04]57// CHECK-ERROR: instruction requires: sve2 or sme58// CHECK-UNKNOWN: 040683ff <unknown>59 60sqshl z0.s, p0/m, z0.s, #061// CHECK-INST: sqshl z0.s, p0/m, z0.s, #062// CHECK-ENCODING: [0x00,0x80,0x46,0x04]63// CHECK-ERROR: instruction requires: sve2 or sme64// CHECK-UNKNOWN: 04468000 <unknown>65 66sqshl z31.s, p0/m, z31.s, #3167// CHECK-INST: sqshl z31.s, p0/m, z31.s, #3168// CHECK-ENCODING: [0xff,0x83,0x46,0x04]69// CHECK-ERROR: instruction requires: sve2 or sme70// CHECK-UNKNOWN: 044683ff <unknown>71 72sqshl z0.d, p0/m, z0.d, #073// CHECK-INST: sqshl z0.d, p0/m, z0.d, #074// CHECK-ENCODING: [0x00,0x80,0x86,0x04]75// CHECK-ERROR: instruction requires: sve2 or sme76// CHECK-UNKNOWN: 04868000 <unknown>77 78sqshl z31.d, p0/m, z31.d, #6379// CHECK-INST: sqshl z31.d, p0/m, z31.d, #6380// CHECK-ENCODING: [0xff,0x83,0xc6,0x04]81// CHECK-ERROR: instruction requires: sve2 or sme82// CHECK-UNKNOWN: 04c683ff <unknown>83 84// --------------------------------------------------------------------------//85// Test compatibility with MOVPRFX instruction.86 87movprfx z31.d, p0/z, z6.d88// CHECK-INST: movprfx z31.d, p0/z, z6.d89// CHECK-ENCODING: [0xdf,0x20,0xd0,0x04]90// CHECK-ERROR: instruction requires: sve or sme91// CHECK-UNKNOWN: 04d020df <unknown>92 93sqshl z31.d, p0/m, z31.d, z30.d94// CHECK-INST: sqshl z31.d, p0/m, z31.d, z30.d95// CHECK-ENCODING: [0xdf,0x83,0xc8,0x44]96// CHECK-ERROR: instruction requires: sve2 or sme97// CHECK-UNKNOWN: 44c883df <unknown>98 99movprfx z31, z6100// CHECK-INST: movprfx z31, z6101// CHECK-ENCODING: [0xdf,0xbc,0x20,0x04]102// CHECK-ERROR: instruction requires: sve or sme103// CHECK-UNKNOWN: 0420bcdf <unknown>104 105sqshl z31.d, p7/m, z31.d, z30.d106// CHECK-INST: sqshl z31.d, p7/m, z31.d, z30.d107// CHECK-ENCODING: [0xdf,0x9f,0xc8,0x44]108// CHECK-ERROR: instruction requires: sve2 or sme109// CHECK-UNKNOWN: 44c89fdf <unknown>110 111movprfx z31.d, p0/z, z6.d112// CHECK-INST: movprfx z31.d, p0/z, z6.d113// CHECK-ENCODING: [0xdf,0x20,0xd0,0x04]114// CHECK-ERROR: instruction requires: sve or sme115// CHECK-UNKNOWN: 04d020df <unknown>116 117sqshl z31.d, p0/m, z31.d, #63118// CHECK-INST: sqshl z31.d, p0/m, z31.d, #63119// CHECK-ENCODING: [0xff,0x83,0xc6,0x04]120// CHECK-ERROR: instruction requires: sve2 or sme121// CHECK-UNKNOWN: 04c683ff <unknown>122 123movprfx z31, z6124// CHECK-INST: movprfx z31, z6125// CHECK-ENCODING: [0xdf,0xbc,0x20,0x04]126// CHECK-ERROR: instruction requires: sve or sme127// CHECK-UNKNOWN: 0420bcdf <unknown>128 129sqshl z31.d, p0/m, z31.d, #63130// CHECK-INST: sqshl z31.d, p0/m, z31.d, #63131// CHECK-ENCODING: [0xff,0x83,0xc6,0x04]132// CHECK-ERROR: instruction requires: sve2 or sme133// CHECK-UNKNOWN: 04c683ff <unknown>134