| 1 |
# RUN: not llvm-mc --triple=loongarch32 %s 2>&1 | FileCheck %s --check-prefixes=ERR,ERR32 |
| 2 |
# RUN: not llvm-mc --triple=loongarch64 %s 2>&1 | FileCheck %s --check-prefix=ERR |
| 3 |
|
| 4 |
## csrxchg: rj != 0,1 |
| 5 |
csrxchg $a0, $zero, 0 |
| 6 |
# ERR: :[[#@LINE-1]]:15: error: must not be $r0 or $r1 |
| 7 |
csrxchg $a0, $ra, 0 |
| 8 |
# ERR: :[[#@LINE-1]]:15: error: must not be $r0 or $r1 |
| 9 |
|
| 10 |
## LoongArch64 mnemonics |
| 11 |
iocsrrd.d $a0, $a1 |
| 12 |
# ERR32: :[[#@LINE-1]]:1: error: instruction requires the following: LA64 Basic Integer and Privilege Instruction Set |
| 13 |
iocsrwr.d $a0, $a1 |
| 14 |
# ERR32: :[[#@LINE-1]]:1: error: instruction requires the following: LA64 Basic Integer and Privilege Instruction Set |
| 15 |
|
| 16 |
## uimm8 |
| 17 |
lddir $a0, $a0, 0x1ff |
| 18 |
# CHECK: :[[#@LINE-1]]:17: error: immediate must be an integer in the range [0, 255] |