[obj2yaml] - Fix a comment. NFC.
[llvm-complete.git] / test / MC / RISCV / rvc-hints-valid.s
blobd75c9d019a28ff89ad40cbc4e783a7858db68c94
1 # RUN: llvm-mc %s -triple=riscv32 -mattr=+c -riscv-no-aliases -show-encoding \
2 # RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
3 # RUN: llvm-mc %s -triple riscv64 -mattr=+c -riscv-no-aliases -show-encoding \
4 # RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
5 # RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+c < %s \
6 # RUN: | llvm-objdump -M no-aliases -d -r - \
7 # RUN: | FileCheck -check-prefixes=CHECK-OBJ,CHECK-ASM-AND-OBJ %s
8 # RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+c < %s \
9 # RUN: | llvm-objdump -M no-aliases -d -r - \
10 # RUN: | FileCheck -check-prefixes=CHECK-OBJ,CHECK-ASM-AND-OBJ %s
12 # CHECK-ASM-AND-OBJ: c.nop 8
13 # CHECK-ASM: encoding: [0x21,0x00]
14 c.nop 8
16 # CHECK-ASM: c.addi zero, 7
17 # CHECK-ASM: encoding: [0x1d,0x00]
18 # CHECK-OBJ: c.nop 7
19 c.addi x0, 7
21 # CHECK-ASM-AND-OBJ: c.addi a0, 0
22 # CHECK-ASM: encoding: [0x01,0x05]
23 c.addi a0, 0
25 # CHECK-ASM-AND-OBJ: c.li zero, 0
26 # CHECK-ASM: encoding: [0x01,0x40]
27 c.li x0, 0
29 # CHECK-ASM-AND-OBJ: c.li zero, 1
30 # CHECK-ASM: encoding: [0x05,0x40]
31 c.li x0, 1
33 # CHECK-ASM-AND-OBJ: c.lui zero, 1
34 # CHECK-ASM: encoding: [0x05,0x60]
35 c.lui x0, 1
37 # CHECK-ASM-AND-OBJ: c.mv zero, a0
38 # CHECK-ASM: encoding: [0x2a,0x80]
39 c.mv x0, a0
41 # CHECK-ASM-AND-OBJ: c.add zero, a0
42 # CHECK-ASM: encoding: [0x2a,0x90]
43 c.add x0, a0
45 # CHECK-ASM-AND-OBJ: c.slli zero, 1
46 # CHECK-ASM: encoding: [0x06,0x00]
47 c.slli x0, 1
49 # CHECK-ASM-AND-OBJ: c.slli64 zero
50 # CHECK-ASM: encoding: [0x02,0x00]
51 c.slli64 x0
53 # CHECK-ASM-AND-OBJ: c.slli64 a0
54 # CHECK-ASM: encoding: [0x02,0x05]
55 c.slli64 a0
57 # CHECK-ASM-AND-OBJ: c.srli64 a1
58 # CHECK-ASM: encoding: [0x81,0x81]
59 c.srli64 a1
61 # CHECK-ASM-AND-OBJ: c.srai64 a0
62 # CHECK-ASM: encoding: [0x01,0x85]
63 c.srai64 a0