Skip to content

Commit e1d6178

Browse files
committed
[RISCV] Add rv64 run lines to rv32 MC layer tests for B extension
Remove common instructions from rv64 tests since they are now covered by the rv64 run lines in the rv32 tests. Add rv32-only* tests for a few cases that aren't common between r32 and rv64. Addresses review feedback from D95150. Reviewed By: frasercrmck Differential Revision: https://reviews.llvm.org/D95272
1 parent bb9eb19 commit e1d6178

22 files changed

+158
-236
lines changed

llvm/test/MC/RISCV/rv32zba-valid.s

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,26 @@
11
# With B extension:
22
# RUN: llvm-mc %s -triple=riscv32 -mattr=+experimental-b -show-encoding \
33
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
4+
# RUN: llvm-mc %s -triple=riscv64 -mattr=+experimental-b -show-encoding \
5+
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
46
# RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+experimental-b < %s \
57
# RUN: | llvm-objdump --mattr=+experimental-b -d -r - \
68
# RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
9+
# RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+experimental-b < %s \
10+
# RUN: | llvm-objdump --mattr=+experimental-b -d -r - \
11+
# RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
712

813
# With Bitmanip base extension:
914
# RUN: llvm-mc %s -triple=riscv32 -mattr=+experimental-zba -show-encoding \
1015
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
16+
# RUN: llvm-mc %s -triple=riscv64 -mattr=+experimental-zba -show-encoding \
17+
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
1118
# RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+experimental-zba < %s \
1219
# RUN: | llvm-objdump --mattr=+experimental-zba -d -r - \
1320
# RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
21+
# RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+experimental-zba < %s \
22+
# RUN: | llvm-objdump --mattr=+experimental-zba -d -r - \
23+
# RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
1424

1525
# CHECK-ASM-AND-OBJ: sh1add t0, t1, t2
1626
# CHECK-ASM: encoding: [0xb3,0x22,0x73,0x20]

llvm/test/MC/RISCV/rv32zbb-valid.s

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,26 @@
11
# With B extension:
22
# RUN: llvm-mc %s -triple=riscv32 -mattr=+experimental-b -show-encoding \
33
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
4+
# RUN: llvm-mc %s -triple=riscv64 -mattr=+experimental-b -show-encoding \
5+
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
46
# RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+experimental-b < %s \
57
# RUN: | llvm-objdump --mattr=+experimental-b -d -r - \
68
# RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
9+
# RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+experimental-b < %s \
10+
# RUN: | llvm-objdump --mattr=+experimental-b -d -r - \
11+
# RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
712

813
# With Bitmanip base extension:
914
# RUN: llvm-mc %s -triple=riscv32 -mattr=+experimental-zbb -riscv-no-aliases -show-encoding \
1015
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
16+
# RUN: llvm-mc %s -triple=riscv64 -mattr=+experimental-zbb -riscv-no-aliases -show-encoding \
17+
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
1118
# RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+experimental-zbb < %s \
1219
# RUN: | llvm-objdump --mattr=+experimental-zbb -M no-aliases -d -r - \
1320
# RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
21+
# RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+experimental-zbb < %s \
22+
# RUN: | llvm-objdump --mattr=+experimental-zbb -M no-aliases -d -r - \
23+
# RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
1424

1525
# CHECK-ASM-AND-OBJ: clz t0, t1
1626
# CHECK-ASM: encoding: [0x93,0x12,0x03,0x60]
@@ -39,12 +49,3 @@ max t0, t1, t2
3949
# CHECK-ASM-AND-OBJ: maxu t0, t1, t2
4050
# CHECK-ASM: encoding: [0xb3,0x72,0x73,0x0a]
4151
maxu t0, t1, t2
42-
# CHECK-ASM-AND-OBJ: zext.h t0, t1
43-
# CHECK-ASM: encoding: [0xb3,0x42,0x03,0x08]
44-
zext.h t0, t1
45-
# CHECK-ASM-AND-OBJ: rev8 t0, t1
46-
# CHECK-ASM: encoding: [0x93,0x52,0x83,0x69]
47-
rev8 t0, t1
48-
# CHECK-ASM-AND-OBJ: orc.b t0, t1
49-
# CHECK-ASM: encoding: [0x93,0x52,0x73,0x28]
50-
orc.b t0, t1
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# With B extension:
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
7+
8+
# With Bitmanip base extension:
9+
# RUN: llvm-mc %s -triple=riscv32 -mattr=+experimental-zbb -riscv-no-aliases -show-encoding \
10+
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
11+
# RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+experimental-zbb < %s \
12+
# RUN: | llvm-objdump --mattr=+experimental-zbb -M no-aliases -d -r - \
13+
# RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
14+
15+
# With Bitmanip permutation extension:
16+
# RUN: llvm-mc %s -triple=riscv32 -mattr=+experimental-zbp -show-encoding \
17+
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
18+
# RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+experimental-zbp < %s \
19+
# RUN: | llvm-objdump --mattr=+experimental-zbp -d -r - \
20+
# RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
21+
22+
# CHECK-ASM-AND-OBJ: zext.h t0, t1
23+
# CHECK-ASM: encoding: [0xb3,0x42,0x03,0x08]
24+
zext.h t0, t1
25+
# CHECK-ASM-AND-OBJ: rev8 t0, t1
26+
# CHECK-ASM: encoding: [0x93,0x52,0x83,0x69]
27+
rev8 t0, t1

llvm/test/MC/RISCV/rv32zbbp-valid.s

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,35 @@
11
# With B extension:
22
# RUN: llvm-mc %s -triple=riscv64 -mattr=+experimental-b -show-encoding \
33
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
4+
# RUN: llvm-mc %s -triple=riscv64 -mattr=+experimental-b -show-encoding \
5+
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
6+
# RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+experimental-b < %s \
7+
# RUN: | llvm-objdump --mattr=+experimental-b -d -r - \
8+
# RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
49
# RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+experimental-b < %s \
510
# RUN: | llvm-objdump --mattr=+experimental-b -d -r - \
611
# RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
712

813
# With Bitmanip base extension:
914
# RUN: llvm-mc %s -triple=riscv64 -mattr=+experimental-zbb -show-encoding \
1015
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
16+
# RUN: llvm-mc %s -triple=riscv64 -mattr=+experimental-zbb -show-encoding \
17+
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
18+
# RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+experimental-zbb < %s \
19+
# RUN: | llvm-objdump --mattr=+experimental-zbb -d -r - \
20+
# RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
1121
# RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+experimental-zbb < %s \
1222
# RUN: | llvm-objdump --mattr=+experimental-zbb -d -r - \
1323
# RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
1424

1525
# With Bitmanip permutation extension:
1626
# RUN: llvm-mc %s -triple=riscv64 -mattr=+experimental-zbp -show-encoding \
1727
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
28+
# RUN: llvm-mc %s -triple=riscv64 -mattr=+experimental-zbp -show-encoding \
29+
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
30+
# RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+experimental-zbp < %s \
31+
# RUN: | llvm-objdump --mattr=+experimental-zbp -d -r - \
32+
# RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
1833
# RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+experimental-zbp < %s \
1934
# RUN: | llvm-objdump --mattr=+experimental-zbp -d -r - \
2035
# RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
@@ -40,3 +55,6 @@ rori t0, t1, 31
4055
# CHECK-ASM-AND-OBJ: rori t0, t1, 0
4156
# CHECK-ASM: encoding: [0x93,0x52,0x03,0x60]
4257
rori t0, t1, 0
58+
# CHECK-ASM-AND-OBJ: orc.b t0, t1
59+
# CHECK-ASM: encoding: [0x93,0x52,0x73,0x28]
60+
orc.b t0, t1

llvm/test/MC/RISCV/rv32zbc-valid.s

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,26 @@
11
# With B extension:
22
# RUN: llvm-mc %s -triple=riscv32 -mattr=+experimental-b -show-encoding \
33
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
4+
# RUN: llvm-mc %s -triple=riscv64 -mattr=+experimental-b -show-encoding \
5+
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
46
# RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+experimental-b < %s \
57
# RUN: | llvm-objdump --mattr=+experimental-b -d -r - \
68
# RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
9+
# RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+experimental-b < %s \
10+
# RUN: | llvm-objdump --mattr=+experimental-b -d -r - \
11+
# RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
712

813
# With Bitmanip carry-less multiply extension:
914
# RUN: llvm-mc %s -triple=riscv32 -mattr=+experimental-zbc -show-encoding \
1015
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
16+
# RUN: llvm-mc %s -triple=riscv64 -mattr=+experimental-zbc -show-encoding \
17+
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
1118
# RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+experimental-zbc < %s \
1219
# RUN: | llvm-objdump --mattr=+experimental-zbc -d -r - \
1320
# RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
21+
# RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+experimental-zbc < %s \
22+
# RUN: | llvm-objdump --mattr=+experimental-zbc -d -r - \
23+
# RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
1424

1525
# CHECK-ASM-AND-OBJ: clmul t0, t1, t2
1626
# CHECK-ASM: encoding: [0xb3,0x12,0x73,0x0a]

llvm/test/MC/RISCV/rv32zbe-valid.s

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,26 @@
11
# With B extension:
22
# RUN: llvm-mc %s -triple=riscv32 -mattr=+experimental-b -show-encoding \
33
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
4+
# RUN: llvm-mc %s -triple=riscv64 -mattr=+experimental-b -show-encoding \
5+
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
46
# RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+experimental-b < %s \
57
# RUN: | llvm-objdump --mattr=+experimental-b -d -r - \
68
# RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
9+
# RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+experimental-b < %s \
10+
# RUN: | llvm-objdump --mattr=+experimental-b -d -r - \
11+
# RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
712

813
# With Bitmanip extract/deposit extension:
914
# RUN: llvm-mc %s -triple=riscv32 -mattr=+experimental-zbe -show-encoding \
1015
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
16+
# RUN: llvm-mc %s -triple=riscv64 -mattr=+experimental-zbe -show-encoding \
17+
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
1118
# RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+experimental-zbe < %s \
1219
# RUN: | llvm-objdump --mattr=+experimental-zbe -d -r - \
1320
# RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
21+
# RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+experimental-zbe < %s \
22+
# RUN: | llvm-objdump --mattr=+experimental-zbe -d -r - \
23+
# RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
1424

1525
# CHECK-ASM-AND-OBJ: bdecompress t0, t1, t2
1626
# CHECK-ASM: encoding: [0xb3,0x62,0x73,0x48]

llvm/test/MC/RISCV/rv32zbf-valid.s

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,26 @@
11
# With B extension:
22
# RUN: llvm-mc %s -triple=riscv32 -mattr=+experimental-b -show-encoding \
33
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
4+
# RUN: llvm-mc %s -triple=riscv64 -mattr=+experimental-b -show-encoding \
5+
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
46
# RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+experimental-b < %s \
57
# RUN: | llvm-objdump --mattr=+experimental-b -d -r - \
68
# RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
9+
# RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+experimental-b < %s \
10+
# RUN: | llvm-objdump --mattr=+experimental-b -d -r - \
11+
# RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
712

813
# With Bit-Field extension:
914
# RUN: llvm-mc %s -triple=riscv32 -mattr=+experimental-zbf -show-encoding \
1015
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
16+
# RUN: llvm-mc %s -triple=riscv64 -mattr=+experimental-zbf -show-encoding \
17+
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
1118
# RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+experimental-zbf < %s \
1219
# RUN: | llvm-objdump --mattr=+experimental-zbf -d -r - \
1320
# RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
21+
# RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+experimental-zbf < %s \
22+
# RUN: | llvm-objdump --mattr=+experimental-zbf -d -r - \
23+
# RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
1424

1525
# CHECK-ASM-AND-OBJ: bfp t0, t1, t2
1626
# CHECK-ASM: encoding: [0xb3,0x72,0x73,0x48]
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# With B extension:
2+
# RUN: llvm-mc %s -triple=riscv32 -mattr=+experimental-b -show-encoding \
3+
# RUN: | FileCheck -check-prefix=CHECK-ASM %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-OBJ %s
7+
8+
# With Bitmanip permutation extension:
9+
# RUN: llvm-mc %s -triple=riscv32 -mattr=+experimental-zbp -show-encoding \
10+
# RUN: | FileCheck -check-prefix=CHECK-ASM %s
11+
# RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+experimental-zbp < %s \
12+
# RUN: | llvm-objdump --mattr=+experimental-zbp -d -r - \
13+
# RUN: | FileCheck --check-prefix=CHECK-OBJ %s
14+
15+
# CHECK-ASM: pack t0, t1, zero
16+
# CHECK-OBJ: zext.h t0, t1
17+
# CHECK-ASM: encoding: [0xb3,0x42,0x03,0x08]
18+
pack t0, t1, x0
19+
# CHECK-ASM: grevi t0, t1, 24
20+
# CHECK-OBJ: rev8 t0, t1
21+
# CHECK-ASM: encoding: [0x93,0x52,0x83,0x69]
22+
grevi t0, t1, 24

llvm/test/MC/RISCV/rv32zbp-valid.s

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,26 @@
11
# With B extension:
22
# RUN: llvm-mc %s -triple=riscv32 -mattr=+experimental-b -show-encoding \
33
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
4+
# RUN: llvm-mc %s -triple=riscv64 -mattr=+experimental-b -show-encoding \
5+
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
46
# RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+experimental-b < %s \
57
# RUN: | llvm-objdump --mattr=+experimental-b -d -r - \
68
# RUN: | FileCheck --check-prefixes=CHECK-OBJ,CHECK-ASM-AND-OBJ %s
9+
# RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+experimental-b < %s \
10+
# RUN: | llvm-objdump --mattr=+experimental-b -d -r - \
11+
# RUN: | FileCheck --check-prefixes=CHECK-OBJ,CHECK-ASM-AND-OBJ %s
712

813
# With Bitmanip permutation extension:
914
# RUN: llvm-mc %s -triple=riscv32 -mattr=+experimental-zbp -show-encoding \
1015
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
16+
# RUN: llvm-mc %s -triple=riscv64 -mattr=+experimental-zbp -show-encoding \
17+
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
1118
# RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+experimental-zbp < %s \
1219
# RUN: | llvm-objdump --mattr=+experimental-zbp -d -r - \
1320
# RUN: | FileCheck --check-prefixes=CHECK-OBJ,CHECK-ASM-AND-OBJ %s
21+
# RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+experimental-zbp < %s \
22+
# RUN: | llvm-objdump --mattr=+experimental-zbp -d -r - \
23+
# RUN: | FileCheck --check-prefixes=CHECK-OBJ,CHECK-ASM-AND-OBJ %s
1424

1525
# CHECK-ASM-AND-OBJ: slo t0, t1, t2
1626
# CHECK-ASM: encoding: [0xb3,0x12,0x73,0x20]
@@ -57,23 +67,6 @@ packu t0, t1, t2
5767
# CHECK-ASM-AND-OBJ: packh t0, t1, t2
5868
# CHECK-ASM: encoding: [0xb3,0x72,0x73,0x08]
5969
packh t0, t1, t2
60-
# CHECK-ASM-AND-OBJ: zext.h t0, t1
61-
# CHECK-ASM: encoding: [0xb3,0x42,0x03,0x08]
62-
zext.h t0, t1
63-
# CHECK-ASM: pack t0, t1, zero
64-
# CHECK-OBJ: zext.h t0, t1
65-
# CHECK-ASM: encoding: [0xb3,0x42,0x03,0x08]
66-
pack t0, t1, x0
67-
# CHECK-ASM-AND-OBJ: rev8 t0, t1
68-
# CHECK-ASM: encoding: [0x93,0x52,0x83,0x69]
69-
rev8 t0, t1
70-
# CHECK-ASM: grevi t0, t1, 24
71-
# CHECK-OBJ: rev8 t0, t1
72-
# CHECK-ASM: encoding: [0x93,0x52,0x83,0x69]
73-
grevi t0, t1, 24
74-
# CHECK-ASM-AND-OBJ: orc.b t0, t1
75-
# CHECK-ASM: encoding: [0x93,0x52,0x73,0x28]
76-
orc.b t0, t1
7770
# CHECK-ASM: gorci t0, t1, 7
7871
# CHECK-OBJ: orc.b t0, t1
7972
# CHECK-ASM: encoding: [0x93,0x52,0x73,0x28]

llvm/test/MC/RISCV/rv32zbproposedc-valid.s

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
# RUN: llvm-mc %s -triple=riscv32 -mattr=+c,+experimental-zbproposedc -riscv-no-aliases -show-encoding \
22
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
3+
# RUN: llvm-mc %s -triple=riscv64 -mattr=+c,+experimental-zbproposedc,+experimental-b -riscv-no-aliases -show-encoding \
4+
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
35
# RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+c,+experimental-zbproposedc < %s \
46
# RUN: | llvm-objdump --mattr=+c,+experimental-zbproposedc -M no-aliases -d -r - \
57
# RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
8+
# RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+c,+experimental-zbproposedc,+experimental-b < %s \
9+
# RUN: | llvm-objdump --mattr=+c,+experimental-zbproposedc,+experimental-b -M no-aliases -d -r - \
10+
# RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
611

712
# CHECK-ASM-AND-OBJ: c.not s0
813
# CHECK-ASM: encoding: [0x01,0x60]

0 commit comments

Comments
 (0)