xref: /llvm-project/llvm/test/MC/LoongArch/Basic/Privilege/invalid.s (revision 3b78065e3026de0d1ea4802cb6a4f35ebc687cdf)
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
5csrxchg $a0, $zero, 0
6# ERR: :[[#@LINE-1]]:15: error: must not be $r0 or $r1
7csrxchg $a0, $ra, 0
8# ERR: :[[#@LINE-1]]:15: error: must not be $r0 or $r1
9
10## LoongArch64 mnemonics
11iocsrrd.d $a0, $a1
12# ERR32: :[[#@LINE-1]]:1: error: instruction requires the following: LA64 Basic Integer and Privilege Instruction Set
13iocsrwr.d $a0, $a1
14# ERR32: :[[#@LINE-1]]:1: error: instruction requires the following: LA64 Basic Integer and Privilege Instruction Set
15
16## uimm8
17lddir $a0, $a0, 0x1ff
18# CHECK: :[[#@LINE-1]]:17: error: immediate must be an integer in the range [0, 255]
19