228 lines · plain
1// RUN: not llvm-mc -triple aarch64-none-linux-gnu -show-encoding -mattr=+mops,+mte < %s 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR2// RUN: not llvm-mc -triple aarch64-none-linux-gnu -show-encoding -mattr=+v8.8a,+mte < %s 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR3 4 5// All operand must be different from each other6 7// CHECK-ERROR: error: invalid CPY instruction, destination and source registers are the same8// CHECK-ERROR: error: invalid CPY instruction, destination and size registers are the same9// CHECK-ERROR: error: invalid CPY instruction, source and size registers are the same10cpyfp [x0]!, [x0]!, x1!11cpyfp [x0]!, [x1]!, x0!12cpyfp [x1]!, [x0]!, x0!13 14// CHECK-ERROR: error: invalid CPY instruction, destination and source registers are the same15// CHECK-ERROR: error: invalid CPY instruction, destination and size registers are the same16// CHECK-ERROR: error: invalid CPY instruction, source and size registers are the same17cpyfm [x0]!, [x0]!, x1!18cpyfm [x0]!, [x1]!, x0!19cpyfm [x1]!, [x0]!, x0!20 21// CHECK-ERROR: error: invalid CPY instruction, destination and source registers are the same22// CHECK-ERROR: error: invalid CPY instruction, destination and size registers are the same23// CHECK-ERROR: error: invalid CPY instruction, source and size registers are the same24cpyfe [x0]!, [x0]!, x1!25cpyfe [x0]!, [x1]!, x0!26cpyfe [x1]!, [x0]!, x0!27 28// CHECK-ERROR: error: invalid CPY instruction, destination and source registers are the same29// CHECK-ERROR: error: invalid CPY instruction, destination and size registers are the same30// CHECK-ERROR: error: invalid CPY instruction, source and size registers are the same31cpyp [x0]!, [x0]!, x1!32cpyp [x0]!, [x1]!, x0!33cpyp [x1]!, [x0]!, x0!34 35// CHECK-ERROR: error: invalid CPY instruction, destination and source registers are the same36// CHECK-ERROR: error: invalid CPY instruction, destination and size registers are the same37// CHECK-ERROR: error: invalid CPY instruction, source and size registers are the same38cpym [x0]!, [x0]!, x1!39cpym [x0]!, [x1]!, x0!40cpym [x1]!, [x0]!, x0!41 42// CHECK-ERROR: error: invalid CPY instruction, destination and source registers are the same43// CHECK-ERROR: error: invalid CPY instruction, destination and size registers are the same44// CHECK-ERROR: error: invalid CPY instruction, source and size registers are the same45cpye [x0]!, [x0]!, x1!46cpye [x0]!, [x1]!, x0!47cpye [x1]!, [x0]!, x0!48 49// CHECK-ERROR: error: invalid SET instruction, destination and size registers are the same50// CHECK-ERROR: error: invalid SET instruction, destination and source registers are the same51// CHECK-ERROR: error: invalid SET instruction, source and size registers are the same52setp [x0]!, x0!, x153setp [x0]!, x1!, x054setp [x1]!, x0!, x055 56// CHECK-ERROR: error: invalid SET instruction, destination and size registers are the same57// CHECK-ERROR: error: invalid SET instruction, destination and source registers are the same58// CHECK-ERROR: error: invalid SET instruction, source and size registers are the same59setm [x0]!, x0!, x160setm [x0]!, x1!, x061setm [x1]!, x0!, x062 63// CHECK-ERROR: error: invalid SET instruction, destination and size registers are the same64// CHECK-ERROR: error: invalid SET instruction, destination and source registers are the same65// CHECK-ERROR: error: invalid SET instruction, source and size registers are the same66sete [x0]!, x0!, x167sete [x0]!, x1!, x068sete [x1]!, x0!, x069 70// CHECK-ERROR: error: invalid SET instruction, destination and size registers are the same71// CHECK-ERROR: error: invalid SET instruction, destination and source registers are the same72// CHECK-ERROR: error: invalid SET instruction, source and size registers are the same73setgp [x0]!, x0!, x174setgp [x0]!, x1!, x075setgp [x1]!, x0!, x076 77// CHECK-ERROR: error: invalid SET instruction, destination and size registers are the same78// CHECK-ERROR: error: invalid SET instruction, destination and source registers are the same79// CHECK-ERROR: error: invalid SET instruction, source and size registers are the same80setgm [x0]!, x0!, x181setgm [x0]!, x1!, x082setgm [x1]!, x0!, x083 84// CHECK-ERROR: error: invalid SET instruction, destination and size registers are the same85// CHECK-ERROR: error: invalid SET instruction, destination and source registers are the same86// CHECK-ERROR: error: invalid SET instruction, source and size registers are the same87setge [x0]!, x0!, x188setge [x0]!, x1!, x089setge [x1]!, x0!, x090 91// SP cannot be used as argument at any position92 93// CHECK-ERROR: error: invalid operand for instruction94// CHECK-ERROR: error: invalid operand for instruction95// CHECK-ERROR: error: invalid operand for instruction96cpyfp [sp]!, [x1]!, x2!97cpyfp [x0]!, [sp]!, x2!98cpyfp [x0]!, [x1]!, sp!99 100// CHECK-ERROR: error: invalid operand for instruction101// CHECK-ERROR: error: invalid operand for instruction102// CHECK-ERROR: error: invalid operand for instruction103cpyfm [sp]!, [x1]!, x2!104cpyfm [x0]!, [sp]!, x2!105cpyfm [x0]!, [x1]!, sp!106 107// CHECK-ERROR: error: invalid operand for instruction108// CHECK-ERROR: error: invalid operand for instruction109// CHECK-ERROR: error: invalid operand for instruction110cpyfe [sp]!, [x1]!, x2!111cpyfe [x0]!, [sp]!, x2!112cpyfe [x0]!, [x1]!, sp!113 114// CHECK-ERROR: error: invalid operand for instruction115// CHECK-ERROR: error: invalid operand for instruction116// CHECK-ERROR: error: invalid operand for instruction117cpyp [sp]!, [x2]!, x2!118cpyp [x0]!, [sp]!, x2!119cpyp [x0]!, [x1]!, sp!120 121// CHECK-ERROR: error: invalid operand for instruction122// CHECK-ERROR: error: invalid operand for instruction123// CHECK-ERROR: error: invalid operand for instruction124cpym [sp]!, [x2]!, x2!125cpym [x0]!, [sp]!, x2!126cpym [x0]!, [x1]!, sp!127 128// CHECK-ERROR: error: invalid operand for instruction129// CHECK-ERROR: error: invalid operand for instruction130// CHECK-ERROR: error: invalid operand for instruction131cpye [sp]!, [x2]!, x2!132cpye [x0]!, [sp]!, x2!133cpye [x0]!, [x1]!, sp!134 135// CHECK-ERROR: error: invalid operand for instruction136// CHECK-ERROR: error: invalid operand for instruction137// CHECK-ERROR: error: invalid operand for instruction138setp [sp]!, x1!, x2139setp [x0]!, sp!, x2140setp [x0]!, x1!, sp141 142// CHECK-ERROR: error: invalid operand for instruction143// CHECK-ERROR: error: invalid operand for instruction144// CHECK-ERROR: error: invalid operand for instruction145setm [sp]!, x1!, x2146setm [x0]!, sp!, x2147setm [x0]!, x1!, sp148 149// CHECK-ERROR: error: invalid operand for instruction150// CHECK-ERROR: error: invalid operand for instruction151// CHECK-ERROR: error: invalid operand for instruction152sete [sp]!, x1!, x2153sete [x0]!, sp!, x2154sete [x0]!, x1!, sp155 156// CHECK-ERROR: error: invalid operand for instruction157// CHECK-ERROR: error: invalid operand for instruction158// CHECK-ERROR: error: invalid operand for instruction159setgp [sp]!, x1!, x2160setgp [x0]!, sp!, x2161setgp [x0]!, x1!, sp162 163// CHECK-ERROR: error: invalid operand for instruction164// CHECK-ERROR: error: invalid operand for instruction165// CHECK-ERROR: error: invalid operand for instruction166setgm [sp]!, x1!, x2167setgm [x0]!, sp!, x2168setgm [x0]!, x1!, sp169 170// CHECK-ERROR: error: invalid operand for instruction171// CHECK-ERROR: error: invalid operand for instruction172// CHECK-ERROR: error: invalid operand for instruction173setge [sp]!, x1!, x2174setge [x0]!, sp!, x2175setge [x0]!, x1!, sp176 177// XZR can only be used at:178// - the size operand in CPY.179// - the size or source operands in SET.180 181// CHECK-ERROR: error: invalid operand for instruction182// CHECK-ERROR: error: invalid operand for instruction183cpyfp [xzr]!, [x1]!, x2!184cpyfp [x0]!, [xzr]!, x2!185 186// CHECK-ERROR: error: invalid operand for instruction187// CHECK-ERROR: error: invalid operand for instruction188cpyfm [xzr]!, [x1]!, x2!189cpyfm [x0]!, [xzr]!, x2!190 191// CHECK-ERROR: error: invalid operand for instruction192// CHECK-ERROR: error: invalid operand for instruction193cpyfe [xzr]!, [x1]!, x2!194cpyfe [x0]!, [xzr]!, x2!195 196// CHECK-ERROR: error: invalid operand for instruction197// CHECK-ERROR: error: invalid operand for instruction198cpyp [xzr]!, [x2]!, x2!199cpyp [x0]!, [xzr]!, x2!200 201// CHECK-ERROR: error: invalid operand for instruction202// CHECK-ERROR: error: invalid operand for instruction203cpym [xzr]!, [x2]!, x2!204cpym [x0]!, [xzr]!, x2!205 206// CHECK-ERROR: error: invalid operand for instruction207// CHECK-ERROR: error: invalid operand for instruction208cpye [xzr]!, [x2]!, x2!209cpye [x0]!, [xzr]!, x2!210 211// CHECK-ERROR: error: invalid operand for instruction212setp [xzr]!, x1!, x2213 214// CHECK-ERROR: error: invalid operand for instruction215setm [xzr]!, x1!, x2216 217// CHECK-ERROR: error: invalid operand for instruction218sete [xzr]!, x1!, x2219 220// CHECK-ERROR: error: invalid operand for instruction221setgp [xzr]!, x1!, x2222 223// CHECK-ERROR: error: invalid operand for instruction224setgm [xzr]!, x1!, x2225 226// CHECK-ERROR: error: invalid operand for instruction227setge [xzr]!, x1!, x2228