1 # RUN: llvm-mc %s -triple=riscv32 -mattr=+zbkb -show-encoding \
2 # RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
3 # RUN: llvm-mc %s -triple=riscv64 -mattr=+zbkb -show-encoding \
4 # RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
5 # RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+zbkb < %s \
6 # RUN: | llvm-objdump --no-print-imm-hex --mattr=+zbkb -d -r - \
7 # RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
8 # RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+zbkb < %s \
9 # RUN: | llvm-objdump --no-print-imm-hex --mattr=+zbkb -d -r - \
10 # RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
12 # CHECK-ASM-AND-OBJ: ror t0, t1, t2
13 # CHECK-ASM: encoding: [0xb3,0x52,0x73,0x60]
15 # CHECK-ASM-AND-OBJ: rol t0, t1, t2
16 # CHECK-ASM: encoding: [0xb3,0x12,0x73,0x60]
18 # CHECK-ASM-AND-OBJ: rori t0, t1, 31
19 # CHECK-ASM: encoding: [0x93,0x52,0xf3,0x61]
21 # CHECK-ASM-AND-OBJ: rori t0, t1, 0
22 # CHECK-ASM: encoding: [0x93,0x52,0x03,0x60]
25 # CHECK-ASM-AND-OBJ: andn t0, t1, t2
26 # CHECK-ASM: encoding: [0xb3,0x72,0x73,0x40]
28 # CHECK-ASM-AND-OBJ: orn t0, t1, t2
29 # CHECK-ASM: encoding: [0xb3,0x62,0x73,0x40]
31 # CHECK-ASM-AND-OBJ: xnor t0, t1, t2
32 # CHECK-ASM: encoding: [0xb3,0x42,0x73,0x40]
35 # CHECK-ASM-AND-OBJ: pack t0, t1, t2
36 # CHECK-ASM: encoding: [0xb3,0x42,0x73,0x08]
39 # CHECK-ASM-AND-OBJ: packh t0, t1, t2
40 # CHECK-ASM: encoding: [0xb3,0x72,0x73,0x08]
43 # CHECK-ASM-AND-OBJ: brev8 t0, t1
44 # CHECK-ASM: encoding: [0x93,0x52,0x73,0x68]