1 # RUN: llvm-mc %s -triple=riscv64 -mattr=+zbs -riscv-no-aliases \
2 # RUN: | FileCheck -check-prefixes=CHECK-S-OBJ-NOALIAS %s
3 # RUN: llvm-mc %s -triple=riscv64 -mattr=+zbs \
4 # RUN: | FileCheck -check-prefixes=CHECK-S-OBJ %s
5 # RUN: llvm-mc -filetype=obj -triple riscv64 -mattr=+zbs < %s \
6 # RUN: | llvm-objdump -d -r -M no-aliases --mattr=+zbs - \
7 # RUN: | FileCheck -check-prefixes=CHECK-S-OBJ-NOALIAS %s
8 # RUN: llvm-mc -filetype=obj -triple riscv64 -mattr=+zbs < %s \
9 # RUN: | llvm-objdump -d -r --mattr=+zbs - \
10 # RUN: | FileCheck -check-prefixes=CHECK-S-OBJ %s
12 # The following check prefixes are used in this test:
13 # CHECK-S-OBJ Match both the .s and objdumped object output with
15 # CHECK-S-OBJ-NOALIAS Match both the .s and objdumped object output with
18 # CHECK-S-OBJ-NOALIAS: bseti t0, t1, 8
19 # CHECK-S-OBJ: bseti t0, t1, 8
22 # CHECK-S-OBJ-NOALIAS: bclri t0, t1, 8
23 # CHECK-S-OBJ: bclri t0, t1, 8
26 # CHECK-S-OBJ-NOALIAS: binvi t0, t1, 8
27 # CHECK-S-OBJ: binvi t0, t1, 8
30 # CHECK-S-OBJ-NOALIAS: bexti t0, t1, 8
31 # CHECK-S-OBJ: bexti t0, t1, 8
34 # CHECK-S-OBJ-NOALIAS: addi t0, zero, 1365
35 # CHECK-S-OBJ-NOALIAS-NEXT: bseti t0, t0, 31
36 # CHECK-S-OBJ: li t0, 1365
37 # CHECK-S-OBJ-NEXT: bseti t0, t0, 31
40 # CHECK-S-OBJ-NOALIAS: lui t1, 572348
41 # CHECK-S-OBJ-NOALIAS-NEXT: addiw t1, t1, -1093
42 # CHECK-S-OBJ-NOALIAS-NEXT: bclri t1, t1, 44
43 # CHECK-S-OBJ-NOALIAS-NEXT: bclri t1, t1, 63
44 # CHECK-S-OBJ: lui t1, 572348
45 # CHECK-S-OBJ-NEXT: addiw t1, t1, -1093
46 # CHECK-S-OBJ-NEXT: bclri t1, t1, 44
47 # CHECK-S-OBJ-NEXT: bclri t1, t1, 63
48 li x6
, 9223354442718100411
50 # CHECK-S-OBJ-NOALIAS: lui t1, 506812
51 # CHECK-S-OBJ-NOALIAS-NEXT: addiw t1, t1, -1093
52 # CHECK-S-OBJ-NOALIAS-NEXT: bseti t1, t1, 46
53 # CHECK-S-OBJ-NOALIAS-NEXT: bseti t1, t1, 63
54 # CHECK-S-OBJ: lui t1, 506812
55 # CHECK-S-OBJ-NEXT: addiw t1, t1, -1093
56 # CHECK-S-OBJ-NEXT: bseti t1, t1, 46
57 # CHECK-S-OBJ-NEXT: bseti t1, t1, 63
58 li x6
, -9223301666034697285
60 # CHECK-S-OBJ-NOALIAS: bseti t2, zero, 11
61 # CHECK-S-OBJ: bseti t2, zero, 11