2 # RUN: llvm-mc %s -triple=riscv32 -mattr=+experimental-b -show-encoding \
3 # RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
4 # RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+experimental-b < %s \
5 # RUN: | llvm-objdump --mattr=+experimental-b -d -r - \
6 # RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
8 # With Bitmanip CRC extension:
9 # RUN: llvm-mc %s -triple=riscv32 -mattr=+experimental-zbr -show-encoding \
10 # RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
11 # RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+experimental-zbr < %s \
12 # RUN: | llvm-objdump --mattr=+experimental-zbr -d -r - \
13 # RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
15 # CHECK-ASM-AND-OBJ: crc32.b t0, t1
16 # CHECK-ASM: encoding: [0x93,0x12,0x03,0x61]
18 # CHECK-ASM-AND-OBJ: crc32.h t0, t1
19 # CHECK-ASM: encoding: [0x93,0x12,0x13,0x61]
21 # CHECK-ASM-AND-OBJ: crc32.w t0, t1
22 # CHECK-ASM: encoding: [0x93,0x12,0x23,0x61]
24 # CHECK-ASM-AND-OBJ: crc32c.b t0, t1
25 # CHECK-ASM: encoding: [0x93,0x12,0x83,0x61]
27 # CHECK-ASM-AND-OBJ: crc32c.h t0, t1
28 # CHECK-ASM: encoding: [0x93,0x12,0x93,0x61]
30 # CHECK-ASM-AND-OBJ: crc32c.w t0, t1
31 # CHECK-ASM: encoding: [0x93,0x12,0xa3,0x61]