1 # With Bitmanip single bit extension:
2 # RUN: llvm-mc %s -triple=riscv32 -mattr=+zbs -show-encoding \
3 # RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
4 # RUN: llvm-mc %s -triple=riscv64 -mattr=+zbs -show-encoding \
5 # RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
6 # RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+zbs < %s \
7 # RUN: | llvm-objdump --mattr=+zbs -d -r - \
8 # RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
9 # RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+zbs < %s \
10 # RUN: | llvm-objdump --mattr=+zbs -d -r - \
11 # RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
13 # CHECK-ASM-AND-OBJ: bclr t0, t1, t2
14 # CHECK-ASM: encoding: [0xb3,0x12,0x73,0x48]
16 # CHECK-ASM-AND-OBJ: bset t0, t1, t2
17 # CHECK-ASM: encoding: [0xb3,0x12,0x73,0x28]
19 # CHECK-ASM-AND-OBJ: binv t0, t1, t2
20 # CHECK-ASM: encoding: [0xb3,0x12,0x73,0x68]
22 # CHECK-ASM-AND-OBJ: bext t0, t1, t2
23 # CHECK-ASM: encoding: [0xb3,0x52,0x73,0x48]
25 # CHECK-ASM-AND-OBJ: bclri t0, t1, 1
26 # CHECK-ASM: encoding: [0x93,0x12,0x13,0x48]
28 # CHECK-ASM-AND-OBJ: bseti t0, t1, 1
29 # CHECK-ASM: encoding: [0x93,0x12,0x13,0x28]
31 # CHECK-ASM-AND-OBJ: binvi t0, t1, 1
32 # CHECK-ASM: encoding: [0x93,0x12,0x13,0x68]
34 # CHECK-ASM-AND-OBJ: bexti t0, t1, 1
35 # CHECK-ASM: encoding: [0x93,0x52,0x13,0x48]