209 lines · plain
1# Xqcibi - Qualcomm uC Branch Immediate Extension2# RUN: not llvm-mc -triple riscv32 -mattr=+experimental-xqcibi < %s 2>&1 \3# RUN: | FileCheck -check-prefixes=CHECK,CHECK-PLUS %s4# RUN: not llvm-mc -triple riscv32 -mattr=-experimental-xqcibi < %s 2>&1 \5# RUN: | FileCheck -check-prefixes=CHECK,CHECK-MINUS %s6 7# CHECK-PLUS: :[[@LINE+2]]:9: error: register must be a GPR excluding zero (x0)8# CHECK-MINUS: :[[@LINE+1]]:9: error: invalid operand for instruction9qc.beqi x0, 12, 34610 11# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction12qc.beqi x8, 1213 14# CHECK-PLUS: :[[@LINE+1]]:13: error: immediate must be non-zero in the range [-16, 15]15qc.beqi x8, 22, 34616 17# CHECK-PLUS: :[[@LINE+1]]:17: error: immediate must be a multiple of 2 bytes in the range [-4096, 4094]18qc.beqi x8, 12, 121119 20# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcibi' (Qualcomm uC Branch Immediate Extension)21qc.beqi x8, 12, 34622 23 24# CHECK-PLUS: :[[@LINE+2]]:9: error: register must be a GPR excluding zero (x0)25# CHECK-MINUS: :[[@LINE+1]]:9: error: invalid operand for instruction26qc.bnei x0, 15, 409427 28# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction29qc.bnei x4, 1530 31# CHECK-PLUS: :[[@LINE+1]]:13: error: immediate must be non-zero in the range [-16, 15]32qc.bnei x4, -45, 409433 34# CHECK-PLUS: :[[@LINE+1]]:17: error: immediate must be a multiple of 2 bytes in the range [-4096, 4094]35qc.bnei x4, 15, 500036 37# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcibi' (Qualcomm uC Branch Immediate Extension)38qc.bnei x4, 15, 409439 40 41# CHECK-PLUS: :[[@LINE+2]]:9: error: register must be a GPR excluding zero (x0)42# CHECK-MINUS: :[[@LINE+1]]:9: error: invalid operand for instruction43qc.bgei x0, 1, -409644 45# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction46qc.bgei x10, 147 48# CHECK-PLUS: :[[@LINE+1]]:14: error: immediate must be non-zero in the range [-16, 15]49qc.bgei x10, 21, -409650 51# CHECK-PLUS: :[[@LINE+1]]:17: error: immediate must be a multiple of 2 bytes in the range [-4096, 4094]52qc.bgei x10, 1, -409853 54# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcibi' (Qualcomm uC Branch Immediate Extension)55qc.bgei x10, 1, -409656 57 58# CHECK-PLUS: :[[@LINE+2]]:9: error: register must be a GPR excluding zero (x0)59# CHECK-MINUS: :[[@LINE+1]]:9: error: invalid operand for instruction60qc.blti x0, 6, 200061 62# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction63qc.blti x1, 664 65# CHECK-PLUS: :[[@LINE+1]]:13: error: immediate must be non-zero in the range [-16, 15]66qc.blti x1, 56, 200067 68# CHECK-PLUS: :[[@LINE+1]]:16: error: immediate must be a multiple of 2 bytes in the range [-4096, 4094]69qc.blti x1, 6, 1200070 71# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcibi' (Qualcomm uC Branch Immediate Extension)72qc.blti x1, 6, 200073 74 75# CHECK-PLUS: :[[@LINE+2]]:10: error: register must be a GPR excluding zero (x0)76# CHECK-MINUS: :[[@LINE+1]]:10: error: invalid operand for instruction77qc.bgeui x0, 11, 12878 79# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction80qc.bgeui x12, 1181 82# CHECK-PLUS: :[[@LINE+1]]:15: error: immediate must be an integer in the range [1, 31]83qc.bgeui x12, 41, 12884 85# CHECK-PLUS: :[[@LINE+1]]:19: error: immediate must be a multiple of 2 bytes in the range [-4096, 4094]86qc.bgeui x12, 11, 1112887 88# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcibi' (Qualcomm uC Branch Immediate Extension)89qc.bgeui x12, 11, 12890 91 92# CHECK-PLUS: :[[@LINE+2]]:10: error: register must be a GPR excluding zero (x0)93# CHECK-MINUS: :[[@LINE+1]]:10: error: invalid operand for instruction94qc.bltui x0, 7, 66695 96# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction97qc.bltui x2, 798 99# CHECK-PLUS: :[[@LINE+1]]:14: error: immediate must be an integer in the range [1, 31]100qc.bltui x2, -7, 666101 102# CHECK-PLUS: :[[@LINE+1]]:17: error: immediate must be a multiple of 2 bytes in the range [-4096, 4094]103qc.bltui x2, 7, -6666104 105# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcibi' (Qualcomm uC Branch Immediate Extension)106qc.bltui x2, 7, 666107 108 109# CHECK-PLUS: :[[@LINE+2]]:11: error: register must be a GPR excluding zero (x0)110# CHECK-MINUS: :[[@LINE+1]]:11: error: invalid operand for instruction111qc.e.beqi x0, 1, 2112 113# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction114qc.e.beqi x1, 1115 116# CHECK-PLUS: :[[@LINE+1]]:15: error: immediate must be non-zero in the range [-32768, 32767]117qc.e.beqi x1, 32768, 2118 119# CHECK-PLUS: :[[@LINE+1]]:18: error: immediate must be a multiple of 2 bytes in the range [-4096, 4094]120qc.e.beqi x1, 1, 21121 122# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcibi' (Qualcomm uC Branch Immediate Extension)123qc.e.beqi x1, 1, 2124 125 126# CHECK-PLUS: :[[@LINE+2]]:11: error: register must be a GPR excluding zero (x0)127# CHECK-MINUS: :[[@LINE+1]]:11: error: invalid operand for instruction128qc.e.bnei x0, 115, 4094129 130# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction131qc.e.bnei x4, 115132 133# CHECK-PLUS: :[[@LINE+1]]:15: error: immediate must be non-zero in the range [-32768, 32767]134qc.e.bnei x4, -33115, 4094135 136# CHECK-PLUS: :[[@LINE+1]]:20: error: immediate must be a multiple of 2 bytes in the range [-4096, 4094]137qc.e.bnei x4, 115, 211138 139# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcibi' (Qualcomm uC Branch Immediate Extension)140qc.e.bnei x4, 115, 4094141 142 143# CHECK-PLUS: :[[@LINE+2]]:11: error: register must be a GPR excluding zero (x0)144# CHECK-MINUS: :[[@LINE+1]]:11: error: invalid operand for instruction145qc.e.bgei x0, -32768, -4096146 147# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction148qc.e.bgei x10, -32768149 150# CHECK-PLUS: :[[@LINE+1]]:16: error: immediate must be non-zero in the range [-32768, 32767]151qc.e.bgei x10, -32769, -4096152 153# CHECK-PLUS: :[[@LINE+1]]:24: error: immediate must be a multiple of 2 bytes in the range [-4096, 4094]154qc.e.bgei x10, -32768, -4097155 156# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcibi' (Qualcomm uC Branch Immediate Extension)157qc.e.bgei x10, -32768, -4096158 159 160# CHECK-PLUS: :[[@LINE+2]]:11: error: register must be a GPR excluding zero (x0)161# CHECK-MINUS: :[[@LINE+1]]:11: error: invalid operand for instruction162qc.e.blti x0, 32767, 2000163 164# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction165qc.e.blti x1, 32767166 167# CHECK-PLUS: :[[@LINE+1]]:15: error: immediate must be non-zero in the range [-32768, 32767]168qc.e.blti x1, 42767, 2000169 170# CHECK-PLUS: :[[@LINE+1]]:22: error: immediate must be a multiple of 2 bytes in the range [-4096, 4094]171qc.e.blti x1, 32767, 2001172 173# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcibi' (Qualcomm uC Branch Immediate Extension)174qc.e.blti x1, 32767, 2000175 176 177# CHECK-PLUS: :[[@LINE+2]]:12: error: register must be a GPR excluding zero (x0)178# CHECK-MINUS: :[[@LINE+1]]:12: error: invalid operand for instruction179qc.e.bgeui x0, 711, 128180 181# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction182qc.e.bgeui x12, 711183 184# CHECK-PLUS: :[[@LINE+1]]:17: error: immediate must be an integer in the range [1, 65535]185qc.e.bgeui x12, 0, 128186 187# CHECK-PLUS: :[[@LINE+1]]:22: error: immediate must be a multiple of 2 bytes in the range [-4096, 4094]188qc.e.bgeui x12, 711, 129189 190# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcibi' (Qualcomm uC Branch Immediate Extension)191qc.e.bgeui x12, 711, 128192 193 194# CHECK-PLUS: :[[@LINE+2]]:12: error: register must be a GPR excluding zero (x0)195# CHECK-MINUS: :[[@LINE+1]]:12: error: invalid operand for instruction196qc.e.bltui x0, 7, 666197 198# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction199qc.e.bltui x2, 7200 201# CHECK-PLUS: :[[@LINE+1]]:16: error: immediate must be an integer in the range [1, 65535]202qc.e.bltui x2, -7, 666203 204# CHECK-PLUS: :[[@LINE+1]]:19: error: immediate must be a multiple of 2 bytes in the range [-4096, 4094]205qc.e.bltui x2, 7, 667206 207# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcibi' (Qualcomm uC Branch Immediate Extension)208qc.e.bltui x2, 7, 666209