PageRenderTime 59ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/test/MC/AArch64/basic-a64-diagnostics.s

http://github.com/earl/llvm-mirror
Assembly | 3893 lines | 3879 code | 14 blank | 0 comment | 9 complexity | 7a0d7fb06ab593b2178a9ef085589a76 MD5 | raw file
Possible License(s): BSD-3-Clause, Apache-2.0

Large files files are truncated, but you can click here to view the full file

  1. // RUN: not llvm-mc -triple aarch64-none-linux-gnu < %s 2> %t
  2. // RUN: FileCheck --check-prefix=CHECK-ERROR --check-prefix=CHECK-ERROR-ARM64 < %t %s
  3. //------------------------------------------------------------------------------
  4. // Add/sub (extended register)
  5. //------------------------------------------------------------------------------
  6. // Mismatched final register and extend
  7. add x2, x3, x5, sxtb
  8. add x2, x4, w2, uxtx
  9. add x2, x4, w2, lsl #3
  10. add w5, w7, x9, sxtx
  11. // CHECK-ERROR: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
  12. // CHECK-ERROR: add x2, x3, x5, sxtb
  13. // CHECK-ERROR: ^
  14. // CHECK-ERROR: error: expected '[su]xt[bhw]' with optional integer in range [0, 4]
  15. // CHECK-ERROR: add x2, x4, w2, uxtx
  16. // CHECK-ERROR: ^
  17. // CHECK-ERROR: error: expected '[su]xt[bhw]' with optional integer in range [0, 4]
  18. // CHECK-ERROR: add x2, x4, w2, lsl #3
  19. // CHECK-ERROR: ^
  20. // CHECK-ERROR: error: expected compatible register, symbol or integer in range [0, 4095]
  21. // CHECK-ERROR: add w5, w7, x9, sxtx
  22. // CHECK-ERROR: ^
  23. // Out of range extends
  24. add x9, x10, w11, uxtb #-1
  25. add x3, x5, w7, uxtb #5
  26. sub x9, x15, x2, uxth #5
  27. // CHECK-ERROR: error: expected integer shift amount
  28. // CHECK-ERROR: add x9, x10, w11, uxtb #-1
  29. // CHECK-ERROR: ^
  30. // CHECK-ERROR: error: expected '[su]xt[bhw]' with optional integer in range [0, 4]
  31. // CHECK-ERROR: add x3, x5, w7, uxtb #5
  32. // CHECK-ERROR: ^
  33. // CHECK-ERROR: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
  34. // CHECK-ERROR: sub x9, x15, x2, uxth #5
  35. // CHECK-ERROR: ^
  36. // Wrong registers on normal variants
  37. add xzr, x3, x5, uxtx
  38. sub x3, xzr, w9, sxth #1
  39. add x1, x2, sp, uxtx
  40. // CHECK-ERROR: error: expected 'lsl', 'lsr' or 'asr' with optional integer in range [0, 63]
  41. // CHECK-ERROR: add xzr, x3, x5, uxtx
  42. // CHECK-ERROR: ^
  43. // CHECK-ERROR: error: invalid operand for instruction
  44. // CHECK-ERROR: sub x3, xzr, w9, sxth #1
  45. // CHECK-ERROR: ^
  46. // CHECK-ERROR: error: expected compatible register, symbol or integer in range [0, 4095]
  47. // CHECK-ERROR: add x1, x2, sp, uxtx
  48. // CHECK-ERROR: ^
  49. // Wrong registers on flag-setting variants
  50. adds sp, x3, w2, uxtb
  51. adds x3, xzr, x9, uxtx
  52. subs x2, x1, sp, uxtx
  53. adds x2, x1, sp, uxtb #2
  54. // CHECK-ERROR: error: invalid operand for instruction
  55. // CHECK-ERROR: adds sp, x3, w2, uxtb
  56. // CHECK-ERROR: ^
  57. // CHECK-ERROR: error: expected 'lsl', 'lsr' or 'asr' with optional integer in range [0, 63]
  58. // CHECK-ERROR: adds x3, xzr, x9, uxtx
  59. // CHECK-ERROR: ^
  60. // CHECK-ERROR: error: expected compatible register, symbol or integer in range [0, 4095]
  61. // CHECK-ERROR: subs x2, x1, sp, uxtx
  62. // CHECK-ERROR: ^
  63. // CHECK-ERROR: error: expected compatible register, symbol or integer in range [0, 4095]
  64. // CHECK-ERROR: adds x2, x1, sp, uxtb #2
  65. // CHECK-ERROR: ^
  66. // Amount not optional if lsl valid and used
  67. add sp, x5, x7, lsl
  68. // CHECK-ERROR: error: expected #imm after shift specifier
  69. // CHECK-ERROR: add sp, x5, x7, lsl
  70. // CHECK-ERROR: ^
  71. //------------------------------------------------------------------------------
  72. // Add/sub (immediate)
  73. //------------------------------------------------------------------------------
  74. // Out of range immediates: more than 12 bits
  75. add w4, w5, #-4097
  76. add w5, w6, #0x1000
  77. add w4, w5, #-4096, lsl #12
  78. add w5, w6, #0x1000, lsl #12
  79. // CHECK-ERROR: error: expected compatible register, symbol or integer in range [0, 4095]
  80. // CHECK-ERROR-NEXT: add w4, w5, #-4097
  81. // CHECK-ERROR-NEXT: ^
  82. // CHECK-ERROR-AARCH64-NEXT: error: expected compatible register, symbol or integer in range [0, 4095]
  83. // CHECK-ERROR-AARCH64-NEXT: add w5, w6, #0x1000
  84. // CHECK-ERROR-AARCH64-NEXT: ^
  85. // CHECK-ERROR-NEXT: error: expected compatible register, symbol or integer in range [0, 4095]
  86. // CHECK-ERROR-NEXT: add w4, w5, #-4096, lsl #12
  87. // CHECK-ERROR-NEXT: ^
  88. // CHECK-ERROR-NEXT: error: expected compatible register, symbol or integer in range [0, 4095]
  89. // CHECK-ERROR-NEXT: add w5, w6, #0x1000, lsl #12
  90. // CHECK-ERROR-NEXT: ^
  91. // Only lsl #0 and lsl #12 are allowed
  92. add w2, w3, #0x1, lsl #1
  93. add w5, w17, #0xfff, lsl #13
  94. add w17, w20, #0x1000, lsl #12
  95. sub xsp, x34, #0x100, lsl #-1
  96. // CHECK-ERROR: error: expected compatible register, symbol or integer in range [0, 4095]
  97. // CHECK-ERROR-NEXT: add w2, w3, #0x1, lsl #1
  98. // CHECK-ERROR-NEXT: ^
  99. // CHECK-ERROR-NEXT: error: expected compatible register, symbol or integer in range [0, 4095]
  100. // CHECK-ERROR-NEXT: add w5, w17, #0xfff, lsl #13
  101. // CHECK-ERROR-NEXT: ^
  102. // CHECK-ERROR-NEXT: error: expected compatible register, symbol or integer in range [0, 4095]
  103. // CHECK-ERROR-NEXT: add w17, w20, #0x1000, lsl #12
  104. // CHECK-ERROR-NEXT: ^
  105. // CHECK-ERROR-NEXT: error: only 'lsl #+N' valid after immediate
  106. // CHECK-ERROR-NEXT: sub xsp, x34, #0x100, lsl #-1
  107. // CHECK-ERROR-NEXT: ^
  108. // Incorrect registers (w31 doesn't exist at all, and 31 decodes to sp for these).
  109. add w31, w20, #1234
  110. add wzr, w20, #0x123
  111. add w20, wzr, #0x321
  112. add wzr, wzr, #0xfff
  113. // CHECK-ERROR: error: invalid operand for instruction
  114. // CHECK-ERROR-NEXT: add w31, w20, #1234
  115. // CHECK-ERROR-NEXT: ^
  116. // CHECK-ERROR-NEXT: error: invalid operand for instruction
  117. // CHECK-ERROR-NEXT: add wzr, w20, #0x123
  118. // CHECK-ERROR-NEXT: ^
  119. // CHECK-ERROR-NEXT: error: invalid operand for instruction
  120. // CHECK-ERROR-NEXT: add w20, wzr, #0x321
  121. // CHECK-ERROR-NEXT: ^
  122. // CHECK-ERROR-NEXT: error: invalid operand for instruction
  123. // CHECK-ERROR-NEXT: add wzr, wzr, #0xfff
  124. // CHECK-ERROR-NEXT: ^
  125. // Mixed register classes
  126. add xsp, w2, #123
  127. sub w2, x30, #32
  128. // CHECK-ERROR: error: invalid operand for instruction
  129. // CHECK-ERROR-NEXT: add xsp, w2, #123
  130. // CHECK-ERROR-NEXT: ^
  131. // CHECK-ERROR-NEXT: error: invalid operand for instruction
  132. // CHECK-ERROR-NEXT: sub w2, x30, #32
  133. // CHECK-ERROR-NEXT: ^
  134. // Out of range immediate
  135. adds w0, w5, #0x10000
  136. // CHECK-ERROR-AARCH64: error: expected compatible register, symbol or integer in range [0, 4095]
  137. // CHECK-ERROR-AARCH64-NEXT: adds w0, w5, #0x10000
  138. // CHECK-ERROR-AARCH64-NEXT: ^
  139. // Wn|WSP should be in second place
  140. adds w4, wzr, #0x123
  141. // ...but wzr is the 31 destination
  142. subs wsp, w5, #123
  143. subs x5, xzr, #0x456, lsl #12
  144. // CHECK-ERROR: error: invalid operand for instruction
  145. // CHECK-ERROR-NEXT: adds w4, wzr, #0x123
  146. // CHECK-ERROR-NEXT: ^
  147. // CHECK-ERROR-NEXT: error: invalid operand for instruction
  148. // CHECK-ERROR-NEXT: subs wsp, w5, #123
  149. // CHECK-ERROR-NEXT: ^
  150. // CHECK-ERROR-NEXT: error: invalid operand for instruction
  151. // CHECK-ERROR-NEXT: subs x5, xzr, #0x456, lsl #12
  152. // CHECK-ERROR-NEXT: ^
  153. // MOV alias should not accept any fiddling
  154. mov x2, xsp, #123
  155. mov wsp, w27, #0xfff, lsl #12
  156. // CHECK-ERROR: error: expected compatible register or logical immediate
  157. // CHECK-ERROR-NEXT: mov x2, xsp, #123
  158. // CHECK-ERROR-NEXT: ^
  159. // CHECK-ERROR-NEXT: error: invalid operand for instruction
  160. // CHECK-ERROR-NEXT: mov wsp, w27, #0xfff, lsl #12
  161. // CHECK-ERROR-NEXT: ^
  162. // A relocation should be provided for symbols
  163. add x3, x9, #variable
  164. add x3, x9, #variable-16
  165. // CHECK-ERROR: error: expected compatible register, symbol or integer in range [0, 4095]
  166. // CHECK-ERROR-NEXT: add x3, x9, #variable
  167. // CHECK-ERROR-NEXT: ^
  168. // CHECK-ERROR-NEXT: error: expected compatible register, symbol or integer in range [0, 4095]
  169. // CHECK-ERROR-NEXT: add x3, x9, #variable-16
  170. // CHECK-ERROR-NEXT: ^
  171. // Relocation on a sub
  172. sub x1, x0, :lo12:loc
  173. // CHECK-ERROR: error: invalid immediate expression
  174. // CHECK-ERROR: sub x1, x0, :lo12:loc
  175. // CHECK-ERROR: ^
  176. //------------------------------------------------------------------------------
  177. // Add-subtract (shifted register)
  178. //------------------------------------------------------------------------------
  179. add wsp, w1, w2, lsr #3
  180. add x4, sp, x9, asr #5
  181. add x9, x10, x5, ror #3
  182. // CHECK-ERROR: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
  183. // CHECK-ERROR-NEXT: add wsp, w1, w2, lsr #3
  184. // CHECK-ERROR-NEXT: ^
  185. // CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
  186. // CHECK-ERROR-NEXT: add x4, sp, x9, asr #5
  187. // CHECK-ERROR-NEXT: ^
  188. // CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
  189. // CHECK-ERROR-NEXT: add x9, x10, x5, ror #3
  190. // CHECK-ERROR-NEXT: ^
  191. add w1, w2, w3, lsl #-1
  192. add w1, w2, w3, lsl #32
  193. add w1, w2, w3, lsr #-1
  194. add w1, w2, w3, lsr #32
  195. add w1, w2, w3, asr #-1
  196. add w1, w2, w3, asr #32
  197. add x1, x2, x3, lsl #-1
  198. add x1, x2, x3, lsl #64
  199. add x1, x2, x3, lsr #-1
  200. add x1, x2, x3, lsr #64
  201. add x1, x2, x3, asr #-1
  202. add x1, x2, x3, asr #64
  203. // CHECK-ERROR: error: expected integer shift amount
  204. // CHECK-ERROR-NEXT: add w1, w2, w3, lsl #-1
  205. // CHECK-ERROR-NEXT: ^
  206. // CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
  207. // CHECK-ERROR-NEXT: add w1, w2, w3, lsl #32
  208. // CHECK-ERROR-NEXT: ^
  209. // CHECK-ERROR-NEXT: error: expected integer shift amount
  210. // CHECK-ERROR-NEXT: add w1, w2, w3, lsr #-1
  211. // CHECK-ERROR-NEXT: ^
  212. // CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
  213. // CHECK-ERROR-NEXT: add w1, w2, w3, lsr #32
  214. // CHECK-ERROR-NEXT: ^
  215. // CHECK-ERROR-NEXT: error: expected integer shift amount
  216. // CHECK-ERROR-NEXT: add w1, w2, w3, asr #-1
  217. // CHECK-ERROR-NEXT: ^
  218. // CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
  219. // CHECK-ERROR-NEXT: add w1, w2, w3, asr #32
  220. // CHECK-ERROR-NEXT: ^
  221. // CHECK-ERROR-NEXT: error: expected integer shift amount
  222. // CHECK-ERROR-NEXT: add x1, x2, x3, lsl #-1
  223. // CHECK-ERROR-NEXT: ^
  224. // CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
  225. // CHECK-ERROR-NEXT: add x1, x2, x3, lsl #64
  226. // CHECK-ERROR-NEXT: ^
  227. // CHECK-ERROR-NEXT: error: expected integer shift amount
  228. // CHECK-ERROR-NEXT: add x1, x2, x3, lsr #-1
  229. // CHECK-ERROR-NEXT: ^
  230. // CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
  231. // CHECK-ERROR-NEXT: add x1, x2, x3, lsr #64
  232. // CHECK-ERROR-NEXT: ^
  233. // CHECK-ERROR-NEXT: error: expected integer shift amount
  234. // CHECK-ERROR-NEXT: add x1, x2, x3, asr #-1
  235. // CHECK-ERROR-NEXT: ^
  236. // CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
  237. // CHECK-ERROR-NEXT: add x1, x2, x3, asr #64
  238. // CHECK-ERROR-NEXT: ^
  239. adds w1, w2, w3, lsl #-1
  240. adds w1, w2, w3, lsl #32
  241. adds w1, w2, w3, lsr #-1
  242. adds w1, w2, w3, lsr #32
  243. adds w1, w2, w3, asr #-1
  244. adds w1, w2, w3, asr #32
  245. adds x1, x2, x3, lsl #-1
  246. adds x1, x2, x3, lsl #64
  247. adds x1, x2, x3, lsr #-1
  248. adds x1, x2, x3, lsr #64
  249. adds x1, x2, x3, asr #-1
  250. adds x1, x2, x3, asr #64
  251. // CHECK-ERROR: error: expected integer shift amount
  252. // CHECK-ERROR-NEXT: adds w1, w2, w3, lsl #-1
  253. // CHECK-ERROR-NEXT: ^
  254. // CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
  255. // CHECK-ERROR-NEXT: adds w1, w2, w3, lsl #32
  256. // CHECK-ERROR-NEXT: ^
  257. // CHECK-ERROR-NEXT: error: expected integer shift amount
  258. // CHECK-ERROR-NEXT: adds w1, w2, w3, lsr #-1
  259. // CHECK-ERROR-NEXT: ^
  260. // CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
  261. // CHECK-ERROR-NEXT: adds w1, w2, w3, lsr #32
  262. // CHECK-ERROR-NEXT: ^
  263. // CHECK-ERROR-NEXT: error: expected integer shift amount
  264. // CHECK-ERROR-NEXT: adds w1, w2, w3, asr #-1
  265. // CHECK-ERROR-NEXT: ^
  266. // CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
  267. // CHECK-ERROR-NEXT: adds w1, w2, w3, asr #32
  268. // CHECK-ERROR-NEXT: ^
  269. // CHECK-ERROR-NEXT: error: expected integer shift amount
  270. // CHECK-ERROR-NEXT: adds x1, x2, x3, lsl #-1
  271. // CHECK-ERROR-NEXT: ^
  272. // CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
  273. // CHECK-ERROR-NEXT: adds x1, x2, x3, lsl #64
  274. // CHECK-ERROR-NEXT: ^
  275. // CHECK-ERROR-NEXT: error: expected integer shift amount
  276. // CHECK-ERROR-NEXT: adds x1, x2, x3, lsr #-1
  277. // CHECK-ERROR-NEXT: ^
  278. // CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
  279. // CHECK-ERROR-NEXT: adds x1, x2, x3, lsr #64
  280. // CHECK-ERROR-NEXT: ^
  281. // CHECK-ERROR-NEXT: error: expected integer shift amount
  282. // CHECK-ERROR-NEXT: adds x1, x2, x3, asr #-1
  283. // CHECK-ERROR-NEXT: ^
  284. // CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
  285. // CHECK-ERROR-NEXT: adds x1, x2, x3, asr #64
  286. // CHECK-ERROR-NEXT: ^
  287. sub w1, w2, w3, lsl #-1
  288. sub w1, w2, w3, lsl #32
  289. sub w1, w2, w3, lsr #-1
  290. sub w1, w2, w3, lsr #32
  291. sub w1, w2, w3, asr #-1
  292. sub w1, w2, w3, asr #32
  293. sub x1, x2, x3, lsl #-1
  294. sub x1, x2, x3, lsl #64
  295. sub x1, x2, x3, lsr #-1
  296. sub x1, x2, x3, lsr #64
  297. sub x1, x2, x3, asr #-1
  298. sub x1, x2, x3, asr #64
  299. // CHECK-ERROR: error: expected integer shift amount
  300. // CHECK-ERROR-NEXT: sub w1, w2, w3, lsl #-1
  301. // CHECK-ERROR-NEXT: ^
  302. // CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
  303. // CHECK-ERROR-NEXT: sub w1, w2, w3, lsl #32
  304. // CHECK-ERROR-NEXT: ^
  305. // CHECK-ERROR-NEXT: error: expected integer shift amount
  306. // CHECK-ERROR-NEXT: sub w1, w2, w3, lsr #-1
  307. // CHECK-ERROR-NEXT: ^
  308. // CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
  309. // CHECK-ERROR-NEXT: sub w1, w2, w3, lsr #32
  310. // CHECK-ERROR-NEXT: ^
  311. // CHECK-ERROR-NEXT: error: expected integer shift amount
  312. // CHECK-ERROR-NEXT: sub w1, w2, w3, asr #-1
  313. // CHECK-ERROR-NEXT: ^
  314. // CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
  315. // CHECK-ERROR-NEXT: sub w1, w2, w3, asr #32
  316. // CHECK-ERROR-NEXT: ^
  317. // CHECK-ERROR-NEXT: error: expected integer shift amount
  318. // CHECK-ERROR-NEXT: sub x1, x2, x3, lsl #-1
  319. // CHECK-ERROR-NEXT: ^
  320. // CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
  321. // CHECK-ERROR-NEXT: sub x1, x2, x3, lsl #64
  322. // CHECK-ERROR-NEXT: ^
  323. // CHECK-ERROR-NEXT: error: expected integer shift amount
  324. // CHECK-ERROR-NEXT: sub x1, x2, x3, lsr #-1
  325. // CHECK-ERROR-NEXT: ^
  326. // CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
  327. // CHECK-ERROR-NEXT: sub x1, x2, x3, lsr #64
  328. // CHECK-ERROR-NEXT: ^
  329. // CHECK-ERROR-NEXT: error: expected integer shift amount
  330. // CHECK-ERROR-NEXT: sub x1, x2, x3, asr #-1
  331. // CHECK-ERROR-NEXT: ^
  332. // CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
  333. // CHECK-ERROR-NEXT: sub x1, x2, x3, asr #64
  334. // CHECK-ERROR-NEXT: ^
  335. subs w1, w2, w3, lsl #-1
  336. subs w1, w2, w3, lsl #32
  337. subs w1, w2, w3, lsr #-1
  338. subs w1, w2, w3, lsr #32
  339. subs w1, w2, w3, asr #-1
  340. subs w1, w2, w3, asr #32
  341. subs x1, x2, x3, lsl #-1
  342. subs x1, x2, x3, lsl #64
  343. subs x1, x2, x3, lsr #-1
  344. subs x1, x2, x3, lsr #64
  345. subs x1, x2, x3, asr #-1
  346. subs x1, x2, x3, asr #64
  347. // CHECK-ERROR: error: expected integer shift amount
  348. // CHECK-ERROR-NEXT: subs w1, w2, w3, lsl #-1
  349. // CHECK-ERROR-NEXT: ^
  350. // CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
  351. // CHECK-ERROR-NEXT: subs w1, w2, w3, lsl #32
  352. // CHECK-ERROR-NEXT: ^
  353. // CHECK-ERROR-NEXT: error: expected integer shift amount
  354. // CHECK-ERROR-NEXT: subs w1, w2, w3, lsr #-1
  355. // CHECK-ERROR-NEXT: ^
  356. // CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
  357. // CHECK-ERROR-NEXT: subs w1, w2, w3, lsr #32
  358. // CHECK-ERROR-NEXT: ^
  359. // CHECK-ERROR-NEXT: error: expected integer shift amount
  360. // CHECK-ERROR-NEXT: subs w1, w2, w3, asr #-1
  361. // CHECK-ERROR-NEXT: ^
  362. // CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
  363. // CHECK-ERROR-NEXT: subs w1, w2, w3, asr #32
  364. // CHECK-ERROR-NEXT: ^
  365. // CHECK-ERROR-NEXT: error: expected integer shift amount
  366. // CHECK-ERROR-NEXT: subs x1, x2, x3, lsl #-1
  367. // CHECK-ERROR-NEXT: ^
  368. // CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
  369. // CHECK-ERROR-NEXT: subs x1, x2, x3, lsl #64
  370. // CHECK-ERROR-NEXT: ^
  371. // CHECK-ERROR-NEXT: error: expected integer shift amount
  372. // CHECK-ERROR-NEXT: subs x1, x2, x3, lsr #-1
  373. // CHECK-ERROR-NEXT: ^
  374. // CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
  375. // CHECK-ERROR-NEXT: subs x1, x2, x3, lsr #64
  376. // CHECK-ERROR-NEXT: ^
  377. // CHECK-ERROR-NEXT: error: expected integer shift amount
  378. // CHECK-ERROR-NEXT: subs x1, x2, x3, asr #-1
  379. // CHECK-ERROR-NEXT: ^
  380. // CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
  381. // CHECK-ERROR-NEXT: subs x1, x2, x3, asr #64
  382. // CHECK-ERROR-NEXT: ^
  383. cmn w9, w10, lsl #-1
  384. cmn w9, w10, lsl #32
  385. cmn w11, w12, lsr #-1
  386. cmn w11, w12, lsr #32
  387. cmn w19, wzr, asr #-1
  388. cmn wzr, wzr, asr #32
  389. cmn x9, x10, lsl #-1
  390. cmn x9, x10, lsl #64
  391. cmn x11, x12, lsr #-1
  392. cmn x11, x12, lsr #64
  393. cmn x19, xzr, asr #-1
  394. cmn xzr, xzr, asr #64
  395. // CHECK-ERROR: error: expected integer shift amount
  396. // CHECK-ERROR-NEXT: cmn w9, w10, lsl #-1
  397. // CHECK-ERROR-NEXT: ^
  398. // CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
  399. // CHECK-ERROR-NEXT: cmn w9, w10, lsl #32
  400. // CHECK-ERROR-NEXT: ^
  401. // CHECK-ERROR-NEXT: error: expected integer shift amount
  402. // CHECK-ERROR-NEXT: cmn w11, w12, lsr #-1
  403. // CHECK-ERROR-NEXT: ^
  404. // CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
  405. // CHECK-ERROR-NEXT: cmn w11, w12, lsr #32
  406. // CHECK-ERROR-NEXT: ^
  407. // CHECK-ERROR-NEXT: error: expected integer shift amount
  408. // CHECK-ERROR-NEXT: cmn w19, wzr, asr #-1
  409. // CHECK-ERROR-NEXT: ^
  410. // CHECK-ERROR-NEXT: error: expected 'lsl', 'lsr' or 'asr' with optional integer in range [0, 31]
  411. // CHECK-ERROR-NEXT: cmn wzr, wzr, asr #32
  412. // CHECK-ERROR-NEXT: ^
  413. // CHECK-ERROR-NEXT: error: expected integer shift amount
  414. // CHECK-ERROR-NEXT: cmn x9, x10, lsl #-1
  415. // CHECK-ERROR-NEXT: ^
  416. // CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
  417. // CHECK-ERROR-NEXT: cmn x9, x10, lsl #64
  418. // CHECK-ERROR-NEXT: ^
  419. // CHECK-ERROR-NEXT: error: expected integer shift amount
  420. // CHECK-ERROR-NEXT: cmn x11, x12, lsr #-1
  421. // CHECK-ERROR-NEXT: ^
  422. // CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
  423. // CHECK-ERROR-NEXT: cmn x11, x12, lsr #64
  424. // CHECK-ERROR-NEXT: ^
  425. // CHECK-ERROR-NEXT: error: expected integer shift amount
  426. // CHECK-ERROR-NEXT: cmn x19, xzr, asr #-1
  427. // CHECK-ERROR-NEXT: ^
  428. // CHECK-ERROR-NEXT: error: expected 'lsl', 'lsr' or 'asr' with optional integer in range [0, 63]
  429. // CHECK-ERROR-NEXT: cmn xzr, xzr, asr #64
  430. // CHECK-ERROR-NEXT: ^
  431. cmp w9, w10, lsl #-1
  432. cmp w9, w10, lsl #32
  433. cmp w11, w12, lsr #-1
  434. cmp w11, w12, lsr #32
  435. cmp w19, wzr, asr #-1
  436. cmp wzr, wzr, asr #32
  437. cmp x9, x10, lsl #-1
  438. cmp x9, x10, lsl #64
  439. cmp x11, x12, lsr #-1
  440. cmp x11, x12, lsr #64
  441. cmp x19, xzr, asr #-1
  442. cmp xzr, xzr, asr #64
  443. // CHECK-ERROR: error: expected integer shift amount
  444. // CHECK-ERROR-NEXT: cmp w9, w10, lsl #-1
  445. // CHECK-ERROR-NEXT: ^
  446. // CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
  447. // CHECK-ERROR-NEXT: cmp w9, w10, lsl #32
  448. // CHECK-ERROR-NEXT: ^
  449. // CHECK-ERROR-NEXT: error: expected integer shift amount
  450. // CHECK-ERROR-NEXT: cmp w11, w12, lsr #-1
  451. // CHECK-ERROR-NEXT: ^
  452. // CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
  453. // CHECK-ERROR-NEXT: cmp w11, w12, lsr #32
  454. // CHECK-ERROR-NEXT: ^
  455. // CHECK-ERROR-NEXT: error: expected integer shift amount
  456. // CHECK-ERROR-NEXT: cmp w19, wzr, asr #-1
  457. // CHECK-ERROR-NEXT: ^
  458. // CHECK-ERROR-NEXT: error: expected 'lsl', 'lsr' or 'asr' with optional integer in range [0, 31]
  459. // CHECK-ERROR-NEXT: cmp wzr, wzr, asr #32
  460. // CHECK-ERROR-NEXT: ^
  461. // CHECK-ERROR-NEXT: error: expected integer shift amount
  462. // CHECK-ERROR-NEXT: cmp x9, x10, lsl #-1
  463. // CHECK-ERROR-NEXT: ^
  464. // CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
  465. // CHECK-ERROR-NEXT: cmp x9, x10, lsl #64
  466. // CHECK-ERROR-NEXT: ^
  467. // CHECK-ERROR-NEXT: error: expected integer shift amount
  468. // CHECK-ERROR-NEXT: cmp x11, x12, lsr #-1
  469. // CHECK-ERROR-NEXT: ^
  470. // CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
  471. // CHECK-ERROR-NEXT: cmp x11, x12, lsr #64
  472. // CHECK-ERROR-NEXT: ^
  473. // CHECK-ERROR-NEXT: error: expected integer shift amount
  474. // CHECK-ERROR-NEXT: cmp x19, xzr, asr #-1
  475. // CHECK-ERROR-NEXT: ^
  476. // CHECK-ERROR-NEXT: error: expected 'lsl', 'lsr' or 'asr' with optional integer in range [0, 63]
  477. // CHECK-ERROR-NEXT: cmp xzr, xzr, asr #64
  478. // CHECK-ERROR-NEXT: ^
  479. neg w9, w10, lsl #-1
  480. neg w9, w10, lsl #32
  481. neg w11, w12, lsr #-1
  482. neg w11, w12, lsr #32
  483. neg w19, wzr, asr #-1
  484. neg wzr, wzr, asr #32
  485. neg x9, x10, lsl #-1
  486. neg x9, x10, lsl #64
  487. neg x11, x12, lsr #-1
  488. neg x11, x12, lsr #64
  489. neg x19, xzr, asr #-1
  490. neg xzr, xzr, asr #64
  491. // CHECK-ERROR: error: expected integer shift amount
  492. // CHECK-ERROR-NEXT: neg w9, w10, lsl #-1
  493. // CHECK-ERROR-NEXT: ^
  494. // CHECK-ERROR-NEXT: error: expected 'lsl', 'lsr' or 'asr' with optional integer in range [0, 31]
  495. // CHECK-ERROR-NEXT: neg w9, w10, lsl #32
  496. // CHECK-ERROR-NEXT: ^
  497. // CHECK-ERROR-NEXT: error: expected integer shift amount
  498. // CHECK-ERROR-NEXT: neg w11, w12, lsr #-1
  499. // CHECK-ERROR-NEXT: ^
  500. // CHECK-ERROR-NEXT: error: expected 'lsl', 'lsr' or 'asr' with optional integer in range [0, 31]
  501. // CHECK-ERROR-NEXT: neg w11, w12, lsr #32
  502. // CHECK-ERROR-NEXT: ^
  503. // CHECK-ERROR-NEXT: error: expected integer shift amount
  504. // CHECK-ERROR-NEXT: neg w19, wzr, asr #-1
  505. // CHECK-ERROR-NEXT: ^
  506. // CHECK-ERROR-NEXT: error: expected 'lsl', 'lsr' or 'asr' with optional integer in range [0, 31]
  507. // CHECK-ERROR-NEXT: neg wzr, wzr, asr #32
  508. // CHECK-ERROR-NEXT: ^
  509. // CHECK-ERROR-NEXT: error: expected integer shift amount
  510. // CHECK-ERROR-NEXT: neg x9, x10, lsl #-1
  511. // CHECK-ERROR-NEXT: ^
  512. // CHECK-ERROR-NEXT: error: expected 'lsl', 'lsr' or 'asr' with optional integer in range [0, 63]
  513. // CHECK-ERROR-NEXT: neg x9, x10, lsl #64
  514. // CHECK-ERROR-NEXT: ^
  515. // CHECK-ERROR-NEXT: error: expected integer shift amount
  516. // CHECK-ERROR-NEXT: neg x11, x12, lsr #-1
  517. // CHECK-ERROR-NEXT: ^
  518. // CHECK-ERROR-NEXT: error: expected 'lsl', 'lsr' or 'asr' with optional integer in range [0, 63]
  519. // CHECK-ERROR-NEXT: neg x11, x12, lsr #64
  520. // CHECK-ERROR-NEXT: ^
  521. // CHECK-ERROR-NEXT: error: expected integer shift amount
  522. // CHECK-ERROR-NEXT: neg x19, xzr, asr #-1
  523. // CHECK-ERROR-NEXT: ^
  524. // CHECK-ERROR-NEXT: error: expected 'lsl', 'lsr' or 'asr' with optional integer in range [0, 63]
  525. // CHECK-ERROR-NEXT: neg xzr, xzr, asr #64
  526. // CHECK-ERROR-NEXT: ^
  527. negs w9, w10, lsl #-1
  528. negs w9, w10, lsl #32
  529. negs w11, w12, lsr #-1
  530. negs w11, w12, lsr #32
  531. negs w19, wzr, asr #-1
  532. negs wzr, wzr, asr #32
  533. negs x9, x10, lsl #-1
  534. negs x9, x10, lsl #64
  535. negs x11, x12, lsr #-1
  536. negs x11, x12, lsr #64
  537. negs x19, xzr, asr #-1
  538. negs xzr, xzr, asr #64
  539. // CHECK-ERROR: error: expected integer shift amount
  540. // CHECK-ERROR-NEXT: negs w9, w10, lsl #-1
  541. // CHECK-ERROR-NEXT: ^
  542. // CHECK-ERROR-NEXT: error: expected 'lsl', 'lsr' or 'asr' with optional integer in range [0, 31]
  543. // CHECK-ERROR-NEXT: negs w9, w10, lsl #32
  544. // CHECK-ERROR-NEXT: ^
  545. // CHECK-ERROR-NEXT: error: expected integer shift amount
  546. // CHECK-ERROR-NEXT: negs w11, w12, lsr #-1
  547. // CHECK-ERROR-NEXT: ^
  548. // CHECK-ERROR-NEXT: error: expected 'lsl', 'lsr' or 'asr' with optional integer in range [0, 31]
  549. // CHECK-ERROR-NEXT: negs w11, w12, lsr #32
  550. // CHECK-ERROR-NEXT: ^
  551. // CHECK-ERROR-NEXT: error: expected integer shift amount
  552. // CHECK-ERROR-NEXT: negs w19, wzr, asr #-1
  553. // CHECK-ERROR-NEXT: ^
  554. // CHECK-ERROR-NEXT: error: expected 'lsl', 'lsr' or 'asr' with optional integer in range [0, 31]
  555. // CHECK-ERROR-NEXT: negs wzr, wzr, asr #32
  556. // CHECK-ERROR-NEXT: ^
  557. // CHECK-ERROR-NEXT: error: expected integer shift amount
  558. // CHECK-ERROR-NEXT: negs x9, x10, lsl #-1
  559. // CHECK-ERROR-NEXT: ^
  560. // CHECK-ERROR-NEXT: error: expected 'lsl', 'lsr' or 'asr' with optional integer in range [0, 63]
  561. // CHECK-ERROR-NEXT: negs x9, x10, lsl #64
  562. // CHECK-ERROR-NEXT: ^
  563. // CHECK-ERROR-NEXT: error: expected integer shift amount
  564. // CHECK-ERROR-NEXT: negs x11, x12, lsr #-1
  565. // CHECK-ERROR-NEXT: ^
  566. // CHECK-ERROR-NEXT: error: expected 'lsl', 'lsr' or 'asr' with optional integer in range [0, 63]
  567. // CHECK-ERROR-NEXT: negs x11, x12, lsr #64
  568. // CHECK-ERROR-NEXT: ^
  569. // CHECK-ERROR-NEXT: error: expected integer shift amount
  570. // CHECK-ERROR-NEXT: negs x19, xzr, asr #-1
  571. // CHECK-ERROR-NEXT: ^
  572. // CHECK-ERROR-NEXT: error: expected 'lsl', 'lsr' or 'asr' with optional integer in range [0, 63]
  573. // CHECK-ERROR-NEXT: negs xzr, xzr, asr #64
  574. // CHECK-ERROR-NEXT: ^
  575. //------------------------------------------------------------------------------
  576. // Add-subtract (shifted register)
  577. //------------------------------------------------------------------------------
  578. adc wsp, w3, w5
  579. adc w1, wsp, w2
  580. adc w0, w10, wsp
  581. // CHECK-ERROR: error: invalid operand for instruction
  582. // CHECK-ERROR-NEXT: adc wsp, w3, w5
  583. // CHECK-ERROR-NEXT: ^
  584. // CHECK-ERROR-NEXT: error: invalid operand for instruction
  585. // CHECK-ERROR-NEXT: adc w1, wsp, w2
  586. // CHECK-ERROR-NEXT: ^
  587. // CHECK-ERROR-NEXT: error: invalid operand for instruction
  588. // CHECK-ERROR-NEXT: adc w0, w10, wsp
  589. // CHECK-ERROR-NEXT: ^
  590. adc sp, x3, x5
  591. adc x1, sp, x2
  592. adc x0, x10, sp
  593. // CHECK-ERROR: error: invalid operand for instruction
  594. // CHECK-ERROR-NEXT: adc sp, x3, x5
  595. // CHECK-ERROR-NEXT: ^
  596. // CHECK-ERROR-NEXT: error: invalid operand for instruction
  597. // CHECK-ERROR-NEXT: adc x1, sp, x2
  598. // CHECK-ERROR-NEXT: ^
  599. // CHECK-ERROR-NEXT: error: invalid operand for instruction
  600. // CHECK-ERROR-NEXT: adc x0, x10, sp
  601. // CHECK-ERROR-NEXT: ^
  602. adcs wsp, w3, w5
  603. adcs w1, wsp, w2
  604. adcs w0, w10, wsp
  605. // CHECK-ERROR: error: invalid operand for instruction
  606. // CHECK-ERROR-NEXT: adcs wsp, w3, w5
  607. // CHECK-ERROR-NEXT: ^
  608. // CHECK-ERROR-NEXT: error: invalid operand for instruction
  609. // CHECK-ERROR-NEXT: adcs w1, wsp, w2
  610. // CHECK-ERROR-NEXT: ^
  611. // CHECK-ERROR-NEXT: error: invalid operand for instruction
  612. // CHECK-ERROR-NEXT: adcs w0, w10, wsp
  613. // CHECK-ERROR-NEXT: ^
  614. adcs sp, x3, x5
  615. adcs x1, sp, x2
  616. adcs x0, x10, sp
  617. // CHECK-ERROR: error: invalid operand for instruction
  618. // CHECK-ERROR-NEXT: adcs sp, x3, x5
  619. // CHECK-ERROR-NEXT: ^
  620. // CHECK-ERROR-NEXT: error: invalid operand for instruction
  621. // CHECK-ERROR-NEXT: adcs x1, sp, x2
  622. // CHECK-ERROR-NEXT: ^
  623. // CHECK-ERROR-NEXT: error: invalid operand for instruction
  624. // CHECK-ERROR-NEXT: adcs x0, x10, sp
  625. // CHECK-ERROR-NEXT: ^
  626. sbc wsp, w3, w5
  627. sbc w1, wsp, w2
  628. sbc w0, w10, wsp
  629. // CHECK-ERROR: error: invalid operand for instruction
  630. // CHECK-ERROR-NEXT: sbc wsp, w3, w5
  631. // CHECK-ERROR-NEXT: ^
  632. // CHECK-ERROR-NEXT: error: invalid operand for instruction
  633. // CHECK-ERROR-NEXT: sbc w1, wsp, w2
  634. // CHECK-ERROR-NEXT: ^
  635. // CHECK-ERROR-NEXT: error: invalid operand for instruction
  636. // CHECK-ERROR-NEXT: sbc w0, w10, wsp
  637. // CHECK-ERROR-NEXT: ^
  638. sbc sp, x3, x5
  639. sbc x1, sp, x2
  640. sbc x0, x10, sp
  641. // CHECK-ERROR: error: invalid operand for instruction
  642. // CHECK-ERROR-NEXT: sbc sp, x3, x5
  643. // CHECK-ERROR-NEXT: ^
  644. // CHECK-ERROR-NEXT: error: invalid operand for instruction
  645. // CHECK-ERROR-NEXT: sbc x1, sp, x2
  646. // CHECK-ERROR-NEXT: ^
  647. // CHECK-ERROR-NEXT: error: invalid operand for instruction
  648. // CHECK-ERROR-NEXT: sbc x0, x10, sp
  649. // CHECK-ERROR-NEXT: ^
  650. sbcs wsp, w3, w5
  651. sbcs w1, wsp, w2
  652. sbcs w0, w10, wsp
  653. // CHECK-ERROR: error: invalid operand for instruction
  654. // CHECK-ERROR-NEXT: sbcs wsp, w3, w5
  655. // CHECK-ERROR-NEXT: ^
  656. // CHECK-ERROR-NEXT: error: invalid operand for instruction
  657. // CHECK-ERROR-NEXT: sbcs w1, wsp, w2
  658. // CHECK-ERROR-NEXT: ^
  659. // CHECK-ERROR-NEXT: error: invalid operand for instruction
  660. // CHECK-ERROR-NEXT: sbcs w0, w10, wsp
  661. // CHECK-ERROR-NEXT: ^
  662. sbcs sp, x3, x5
  663. sbcs x1, sp, x2
  664. sbcs x0, x10, sp
  665. // CHECK-ERROR: error: invalid operand for instruction
  666. // CHECK-ERROR-NEXT: sbcs sp, x3, x5
  667. // CHECK-ERROR-NEXT: ^
  668. // CHECK-ERROR-NEXT: error: invalid operand for instruction
  669. // CHECK-ERROR-NEXT: sbcs x1, sp, x2
  670. // CHECK-ERROR-NEXT: ^
  671. // CHECK-ERROR-NEXT: error: invalid operand for instruction
  672. // CHECK-ERROR-NEXT: sbcs x0, x10, sp
  673. // CHECK-ERROR-NEXT: ^
  674. ngc wsp, w3
  675. ngc w9, wsp
  676. ngc sp, x9
  677. ngc x2, sp
  678. // CHECK-ERROR: error: invalid operand for instruction
  679. // CHECK-ERROR-NEXT: ngc wsp, w3
  680. // CHECK-ERROR-NEXT: ^
  681. // CHECK-ERROR-NEXT: error: invalid operand for instruction
  682. // CHECK-ERROR-NEXT: ngc w9, wsp
  683. // CHECK-ERROR-NEXT: ^
  684. // CHECK-ERROR-NEXT: error: invalid operand for instruction
  685. // CHECK-ERROR-NEXT: ngc sp, x9
  686. // CHECK-ERROR-NEXT: ^
  687. // CHECK-ERROR-NEXT: error: invalid operand for instruction
  688. // CHECK-ERROR-NEXT: ngc x2, sp
  689. // CHECK-ERROR-NEXT: ^
  690. ngcs wsp, w3
  691. ngcs w9, wsp
  692. ngcs sp, x9
  693. ngcs x2, sp
  694. // CHECK-ERROR: error: invalid operand for instruction
  695. // CHECK-ERROR-NEXT: ngcs wsp, w3
  696. // CHECK-ERROR-NEXT: ^
  697. // CHECK-ERROR-NEXT: error: invalid operand for instruction
  698. // CHECK-ERROR-NEXT: ngcs w9, wsp
  699. // CHECK-ERROR-NEXT: ^
  700. // CHECK-ERROR-NEXT: error: invalid operand for instruction
  701. // CHECK-ERROR-NEXT: ngcs sp, x9
  702. // CHECK-ERROR-NEXT: ^
  703. // CHECK-ERROR-NEXT: error: invalid operand for instruction
  704. // CHECK-ERROR-NEXT: ngcs x2, sp
  705. // CHECK-ERROR-NEXT: ^
  706. //------------------------------------------------------------------------------
  707. // Logical (immediates)
  708. //------------------------------------------------------------------------------
  709. and w2, w3, #4294967296
  710. eor w2, w3, #4294967296
  711. orr w2, w3, #4294967296
  712. ands w2, w3, #4294967296
  713. // CHECK-ERROR: error: expected compatible register or logical immediate
  714. // CHECK-ERROR-NEXT: and w2, w3, #4294967296
  715. // CHECK-ERROR-NEXT: ^
  716. // CHECK-ERROR-NEXT: error: expected compatible register or logical immediate
  717. // CHECK-ERROR-NEXT: eor w2, w3, #4294967296
  718. // CHECK-ERROR-NEXT: ^
  719. // CHECK-ERROR-NEXT: error: expected compatible register or logical immediate
  720. // CHECK-ERROR-NEXT: orr w2, w3, #4294967296
  721. // CHECK-ERROR-NEXT: ^
  722. // CHECK-ERROR-NEXT: error: expected compatible register or logical immediate
  723. // CHECK-ERROR-NEXT: ands w2, w3, #4294967296
  724. // CHECK-ERROR-NEXT: ^
  725. //------------------------------------------------------------------------------
  726. // Bitfield
  727. //------------------------------------------------------------------------------
  728. sbfm x3, w13, #0, #0
  729. sbfm w12, x9, #0, #0
  730. sbfm sp, x3, #3, #5
  731. sbfm w3, wsp, #1, #9
  732. sbfm x9, x5, #-1, #0
  733. sbfm x9, x5, #0, #-1
  734. // CHECK-ERROR: error: invalid operand for instruction
  735. // CHECK-ERROR-NEXT: sbfm x3, w13, #0, #0
  736. // CHECK-ERROR-NEXT: ^
  737. // CHECK-ERROR-NEXT: error: invalid operand for instruction
  738. // CHECK-ERROR-NEXT: sbfm w12, x9, #0, #0
  739. // CHECK-ERROR-NEXT: ^
  740. // CHECK-ERROR-NEXT: error: invalid operand for instruction
  741. // CHECK-ERROR-NEXT: sbfm sp, x3, #3, #5
  742. // CHECK-ERROR-NEXT: ^
  743. // CHECK-ERROR-NEXT: error: invalid operand for instruction
  744. // CHECK-ERROR-NEXT: sbfm w3, wsp, #1, #9
  745. // CHECK-ERROR-NEXT: ^
  746. // CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 63]
  747. // CHECK-ERROR-NEXT: sbfm x9, x5, #-1, #0
  748. // CHECK-ERROR-NEXT: ^
  749. // CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 63]
  750. // CHECK-ERROR-NEXT: sbfm x9, x5, #0, #-1
  751. // CHECK-ERROR-NEXT: ^
  752. sbfm w3, w5, #32, #1
  753. sbfm w7, w11, #19, #32
  754. sbfm x29, x30, #64, #0
  755. sbfm x10, x20, #63, #64
  756. // CHECK-ERROR: error: {{expected|immediate must be an}} integer in range [0, 31]
  757. // CHECK-ERROR-NEXT: sbfm w3, w5, #32, #1
  758. // CHECK-ERROR-NEXT: ^
  759. // CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 31]
  760. // CHECK-ERROR-NEXT: sbfm w7, w11, #19, #32
  761. // CHECK-ERROR-NEXT: ^
  762. // CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 63]
  763. // CHECK-ERROR-NEXT: sbfm x29, x30, #64, #0
  764. // CHECK-ERROR-NEXT: ^
  765. // CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 63]
  766. // CHECK-ERROR-NEXT: sbfm x10, x20, #63, #64
  767. // CHECK-ERROR-NEXT: ^
  768. ubfm w3, w5, #32, #1
  769. ubfm w7, w11, #19, #32
  770. ubfm x29, x30, #64, #0
  771. ubfm x10, x20, #63, #64
  772. // CHECK-ERROR: error: {{expected|immediate must be an}} integer in range [0, 31]
  773. // CHECK-ERROR-NEXT: ubfm w3, w5, #32, #1
  774. // CHECK-ERROR-NEXT: ^
  775. // CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 31]
  776. // CHECK-ERROR-NEXT: ubfm w7, w11, #19, #32
  777. // CHECK-ERROR-NEXT: ^
  778. // CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 63]
  779. // CHECK-ERROR-NEXT: ubfm x29, x30, #64, #0
  780. // CHECK-ERROR-NEXT: ^
  781. // CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 63]
  782. // CHECK-ERROR-NEXT: ubfm x10, x20, #63, #64
  783. // CHECK-ERROR-NEXT: ^
  784. bfm w3, w5, #32, #1
  785. bfm w7, w11, #19, #32
  786. bfm x29, x30, #64, #0
  787. bfm x10, x20, #63, #64
  788. // CHECK-ERROR: error: {{expected|immediate must be an}} integer in range [0, 31]
  789. // CHECK-ERROR-NEXT: bfm w3, w5, #32, #1
  790. // CHECK-ERROR-NEXT: ^
  791. // CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 31]
  792. // CHECK-ERROR-NEXT: bfm w7, w11, #19, #32
  793. // CHECK-ERROR-NEXT: ^
  794. // CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 63]
  795. // CHECK-ERROR-NEXT: bfm x29, x30, #64, #0
  796. // CHECK-ERROR-NEXT: ^
  797. // CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 63]
  798. // CHECK-ERROR-NEXT: bfm x10, x20, #63, #64
  799. // CHECK-ERROR-NEXT: ^
  800. sxtb x3, x2
  801. sxth xzr, xzr
  802. sxtw x3, x5
  803. // CHECK-ERROR-AARCH64: error: invalid operand for instruction
  804. // CHECK-ERROR-AARCH64-NEXT: sxtb x3, x2
  805. // CHECK-ERROR-AARCH64-NEXT: ^
  806. // CHECK-ERROR-AARCH64-NEXT: error: invalid operand for instruction
  807. // CHECK-ERROR-AARCH64-NEXT: sxth xzr, xzr
  808. // CHECK-ERROR-AARCH64-NEXT: ^
  809. // CHECK-ERROR-AARCH64-NEXT: error: invalid operand for instruction
  810. // CHECK-ERROR-AARCH64-NEXT: sxtw x3, x5
  811. // CHECK-ERROR-AARCH64-NEXT: ^
  812. uxtb x3, x12
  813. uxth x5, x9
  814. uxtw x3, x5
  815. uxtb x2, sp
  816. uxtb sp, xzr
  817. // CHECK-ERROR: error: invalid operand for instruction
  818. // CHECK-ERROR-NEXT: uxtb x3, x12
  819. // CHECK-ERROR-NEXT: ^
  820. // CHECK-ERROR-NEXT: error: invalid operand for instruction
  821. // CHECK-ERROR-NEXT: uxth x5, x9
  822. // CHECK-ERROR-NEXT: ^
  823. // CHECK-ERROR-AARCH64-NEXT: error: invalid instruction
  824. // CHECK-ERROR-AARCH64-NEXT: uxtw x3, x5
  825. // CHECK-ERROR-AARCH64-NEXT: ^
  826. // CHECK-ERROR-NEXT: error: invalid operand for instruction
  827. // CHECK-ERROR-NEXT: uxtb x2, sp
  828. // CHECK-ERROR-NEXT: ^
  829. // CHECK-ERROR-NEXT: error: invalid operand for instruction
  830. // CHECK-ERROR-NEXT: uxtb sp, xzr
  831. // CHECK-ERROR-NEXT: ^
  832. asr x3, w2, #1
  833. asr sp, x2, #1
  834. asr x25, x26, #-1
  835. asr x25, x26, #64
  836. asr w9, w8, #32
  837. // CHECK-ERROR: error: invalid operand for instruction
  838. // CHECK-ERROR-NEXT: asr x3, w2, #1
  839. // CHECK-ERROR-NEXT: ^
  840. // CHECK-ERROR-NEXT: error: invalid operand for instruction
  841. // CHECK-ERROR-NEXT: asr sp, x2, #1
  842. // CHECK-ERROR-NEXT: ^
  843. // CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 63]
  844. // CHECK-ERROR-NEXT: asr x25, x26, #-1
  845. // CHECK-ERROR-NEXT: ^
  846. // CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 63]
  847. // CHECK-ERROR-NEXT: asr x25, x26, #64
  848. // CHECK-ERROR-NEXT: ^
  849. // CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 31]
  850. // CHECK-ERROR-NEXT: asr w9, w8, #32
  851. // CHECK-ERROR-NEXT: ^
  852. sbfiz w1, w2, #0, #0
  853. sbfiz wsp, w9, #0, #1
  854. sbfiz w9, w10, #32, #1
  855. sbfiz w11, w12, #32, #0
  856. sbfiz w9, w10, #10, #23
  857. sbfiz x3, x5, #12, #53
  858. sbfiz sp, x3, #7, #6
  859. sbfiz w3, wsp, #10, #8
  860. // CHECK-ERROR-AARCH64: error: expected integer in range [<lsb>, 31]
  861. // CHECK-ERROR-ARM64: error: expected integer in range [1, 32]
  862. // CHECK-ERROR-NEXT: sbfiz w1, w2, #0, #0
  863. // CHECK-ERROR-NEXT: ^
  864. // CHECK-ERROR-NEXT: error: invalid operand for instruction
  865. // CHECK-ERROR-NEXT: sbfiz wsp, w9, #0, #1
  866. // CHECK-ERROR-NEXT: ^
  867. // CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 31]
  868. // CHECK-ERROR-NEXT: sbfiz w9, w10, #32, #1
  869. // CHECK-ERROR-NEXT: ^
  870. // CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 31]
  871. // CHECK-ERROR-NEXT: sbfiz w11, w12, #32, #0
  872. // CHECK-ERROR-NEXT: ^
  873. // CHECK-ERROR-NEXT: error: requested insert overflows register
  874. // CHECK-ERROR-NEXT: sbfiz w9, w10, #10, #23
  875. // CHECK-ERROR-NEXT: ^
  876. // CHECK-ERROR-NEXT: error: requested insert overflows register
  877. // CHECK-ERROR-NEXT: sbfiz x3, x5, #12, #53
  878. // CHECK-ERROR-NEXT: ^
  879. // CHECK-ERROR-NEXT: error: invalid operand for instruction
  880. // CHECK-ERROR-NEXT: sbfiz sp, x3, #7, #6
  881. // CHECK-ERROR-NEXT: ^
  882. // CHECK-ERROR-NEXT: error: invalid operand for instruction
  883. // CHECK-ERROR-NEXT: sbfiz w3, wsp, #10, #8
  884. // CHECK-ERROR-NEXT: ^
  885. sbfx w1, w2, #0, #0
  886. sbfx wsp, w9, #0, #1
  887. sbfx w9, w10, #32, #1
  888. sbfx w11, w12, #32, #0
  889. sbfx w9, w10, #10, #23
  890. sbfx x3, x5, #12, #53
  891. sbfx sp, x3, #7, #6
  892. sbfx w3, wsp, #10, #8
  893. // CHECK-ERROR-AARCH64: error: expected integer in range [<lsb>, 31]
  894. // CHECK-ERROR-ARM64: error: expected integer in range [1, 32]
  895. // CHECK-ERROR-NEXT: sbfx w1, w2, #0, #0
  896. // CHECK-ERROR-NEXT: ^
  897. // CHECK-ERROR-NEXT: error: invalid operand for instruction
  898. // CHECK-ERROR-NEXT: sbfx wsp, w9, #0, #1
  899. // CHECK-ERROR-NEXT: ^
  900. // CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 31]
  901. // CHECK-ERROR-NEXT: sbfx w9, w10, #32, #1
  902. // CHECK-ERROR-NEXT: ^
  903. // CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 31]
  904. // CHECK-ERROR-NEXT: sbfx w11, w12, #32, #0
  905. // CHECK-ERROR-NEXT: ^
  906. // CHECK-ERROR-NEXT: error: requested extract overflows register
  907. // CHECK-ERROR-NEXT: sbfx w9, w10, #10, #23
  908. // CHECK-ERROR-NEXT: ^
  909. // CHECK-ERROR-NEXT: error: requested extract overflows register
  910. // CHECK-ERROR-NEXT: sbfx x3, x5, #12, #53
  911. // CHECK-ERROR-NEXT: ^
  912. // CHECK-ERROR-NEXT: error: invalid operand for instruction
  913. // CHECK-ERROR-NEXT: sbfx sp, x3, #7, #6
  914. // CHECK-ERROR-NEXT: ^
  915. // CHECK-ERROR-NEXT: error: invalid operand for instruction
  916. // CHECK-ERROR-NEXT: sbfx w3, wsp, #10, #8
  917. // CHECK-ERROR-NEXT: ^
  918. bfi w1, w2, #0, #0
  919. bfi wsp, w9, #0, #1
  920. bfi w9, w10, #32, #1
  921. bfi w11, w12, #32, #0
  922. bfi w9, w10, #10, #23
  923. bfi x3, x5, #12, #53
  924. bfi sp, x3, #7, #6
  925. bfi w3, wsp, #10, #8
  926. // CHECK-ERROR-AARCH64: error: expected integer in range [<lsb>, 31]
  927. // CHECK-ERROR-ARM64: error: expected integer in range [1, 32]
  928. // CHECK-ERROR-NEXT: bfi w1, w2, #0, #0
  929. // CHECK-ERROR-NEXT: ^
  930. // CHECK-ERROR-NEXT: error: invalid operand for instruction
  931. // CHECK-ERROR-NEXT: bfi wsp, w9, #0, #1
  932. // CHECK-ERROR-NEXT: ^
  933. // CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 31]
  934. // CHECK-ERROR-NEXT: bfi w9, w10, #32, #1
  935. // CHECK-ERROR-NEXT: ^
  936. // CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 31]
  937. // CHECK-ERROR-NEXT: bfi w11, w12, #32, #0
  938. // CHECK-ERROR-NEXT: ^
  939. // CHECK-ERROR-NEXT: error: requested insert overflows register
  940. // CHECK-ERROR-NEXT: bfi w9, w10, #10, #23
  941. // CHECK-ERROR-NEXT: ^
  942. // CHECK-ERROR-NEXT: error: requested insert overflows register
  943. // CHECK-ERROR-NEXT: bfi x3, x5, #12, #53
  944. // CHECK-ERROR-NEXT: ^
  945. // CHECK-ERROR-NEXT: error: invalid operand for instruction
  946. // CHECK-ERROR-NEXT: bfi sp, x3, #7, #6
  947. // CHECK-ERROR-NEXT: ^
  948. // CHECK-ERROR-NEXT: error: invalid operand for instruction
  949. // CHECK-ERROR-NEXT: bfi w3, wsp, #10, #8
  950. // CHECK-ERROR-NEXT: ^
  951. bfxil w1, w2, #0, #0
  952. bfxil wsp, w9, #0, #1
  953. bfxil w9, w10, #32, #1
  954. bfxil w11, w12, #32, #0
  955. bfxil w9, w10, #10, #23
  956. bfxil x3, x5, #12, #53
  957. bfxil sp, x3, #7, #6
  958. bfxil w3, wsp, #10, #8
  959. // CHECK-ERROR-AARCH64: error: expected integer in range [<lsb>, 31]
  960. // CHECK-ERROR-ARM64: error: expected integer in range [1, 32]
  961. // CHECK-ERROR-NEXT: bfxil w1, w2, #0, #0
  962. // CHECK-ERROR-NEXT: ^
  963. // CHECK-ERROR-NEXT: error: invalid operand for instruction
  964. // CHECK-ERROR-NEXT: bfxil wsp, w9, #0, #1
  965. // CHECK-ERROR-NEXT: ^
  966. // CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 31]
  967. // CHECK-ERROR-NEXT: bfxil w9, w10, #32, #1
  968. // CHECK-ERROR-NEXT: ^
  969. // CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 31]
  970. // CHECK-ERROR-NEXT: bfxil w11, w12, #32, #0
  971. // CHECK-ERROR-NEXT: ^
  972. // CHECK-ERROR-NEXT: error: requested extract overflows register
  973. // CHECK-ERROR-NEXT: bfxil w9, w10, #10, #23
  974. // CHECK-ERROR-NEXT: ^
  975. // CHECK-ERROR-NEXT: error: requested extract overflows register
  976. // CHECK-ERROR-NEXT: bfxil x3, x5, #12, #53
  977. // CHECK-ERROR-NEXT: ^
  978. // CHECK-ERROR-NEXT: error: invalid operand for instruction
  979. // CHECK-ERROR-NEXT: bfxil sp, x3, #7, #6
  980. // CHECK-ERROR-NEXT: ^
  981. // CHECK-ERROR-NEXT: error: invalid operand for instruction
  982. // CHECK-ERROR-NEXT: bfxil w3, wsp, #10, #8
  983. // CHECK-ERROR-NEXT: ^
  984. ubfiz w1, w2, #0, #0
  985. ubfiz wsp, w9, #0, #1
  986. ubfiz w9, w10, #32, #1
  987. ubfiz w11, w12, #32, #0
  988. ubfiz w9, w10, #10, #23
  989. ubfiz x3, x5, #12, #53
  990. ubfiz sp, x3, #7, #6
  991. ubfiz w3, wsp, #10, #8
  992. // CHECK-ERROR-AARCH64: error: expected integer in range [<lsb>, 31]
  993. // CHECK-ERROR-ARM64: error: expected integer in range [1, 32]
  994. // CHECK-ERROR-NEXT: ubfiz w1, w2, #0, #0
  995. // CHECK-ERROR-NEXT: ^
  996. // CHECK-ERROR-NEXT: error: invalid operand for instruction
  997. // CHECK-ERROR-NEXT: ubfiz wsp, w9, #0, #1
  998. // CHECK-ERROR-NEXT: ^
  999. // CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 31]
  1000. // CHECK-ERROR-NEXT: ubfiz w9, w10, #32, #1
  1001. // CHECK-ERROR-NEXT: ^
  1002. // CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 31]
  1003. // CHECK-ERROR-NEXT: ubfiz w11, w12, #32, #0
  1004. // CHECK-ERROR-NEXT: ^
  1005. // …

Large files files are truncated, but you can click here to view the full file