2 # RUN: llvm-mc %s -triple=riscv64 -mattr=+experimental-b -show-encoding \
3 # RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
4 # RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+experimental-b < %s \
5 # RUN: | llvm-objdump --mattr=+experimental-b -d -r - \
6 # RUN: | FileCheck --check-prefixes=CHECK-OBJ,CHECK-ASM-AND-OBJ %s
8 # With Bitmanip permutation extension:
9 # RUN: llvm-mc %s -triple=riscv64 -mattr=+experimental-zbp -show-encoding \
10 # RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
11 # RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+experimental-zbp < %s \
12 # RUN: | llvm-objdump --mattr=+experimental-zbp -d -r - \
13 # RUN: | FileCheck --check-prefixes=CHECK-OBJ,CHECK-ASM-AND-OBJ %s
15 # CHECK-ASM-AND-OBJ: gorcw t0, t1, t2
16 # CHECK-ASM: encoding: [0xbb,0x52,0x73,0x28]
18 # CHECK-ASM-AND-OBJ: grevw t0, t1, t2
19 # CHECK-ASM: encoding: [0xbb,0x52,0x73,0x68]
21 # CHECK-ASM-AND-OBJ: gorciw t0, t1, 0
22 # CHECK-ASM: encoding: [0x9b,0x52,0x03,0x28]
24 # CHECK-ASM-AND-OBJ: greviw t0, t1, 0
25 # CHECK-ASM: encoding: [0x9b,0x52,0x03,0x68]
27 # CHECK-ASM-AND-OBJ: shflw t0, t1, t2
28 # CHECK-ASM: encoding: [0xbb,0x12,0x73,0x08]
30 # CHECK-ASM-AND-OBJ: unshflw t0, t1, t2
31 # CHECK-ASM: encoding: [0xbb,0x52,0x73,0x08]
33 # CHECK-ASM-AND-OBJ: packw t0, t1, t2
34 # CHECK-ASM: encoding: [0xbb,0x42,0x73,0x08]
36 # CHECK-ASM-AND-OBJ: packuw t0, t1, t2
37 # CHECK-ASM: encoding: [0xbb,0x42,0x73,0x48]
39 # CHECK-ASM: packw t0, t1, zero
40 # CHECK-OBJ: zext.h t0, t1
41 # CHECK-ASM: encoding: [0xbb,0x42,0x03,0x08]
43 # CHECK-ASM: grevi t0, t1, 56
44 # CHECK-OBJ: rev8 t0, t1
45 # CHECK-ASM: encoding: [0x93,0x52,0x83,0x6b]
47 # CHECK-ASM-AND-OBJ: xperm.w t0, t1, t2
48 # CHECK-ASM: encoding: [0xb3,0x02,0x73,0x28]