Skip to content

Commit a577113

Browse files
committed
fixup! [RISCV] Fix Branch/Jump Immediates
1 parent a96e171 commit a577113

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# RUN: llvm-mc %s -triple=riscv32 -mattr=+zicbop -show-encoding \
2+
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
3+
# RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+zicbop < %s \
4+
# RUN: | llvm-objdump --no-print-imm-hex --mattr=+zicbop -d -r - \
5+
# RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
6+
7+
## This test checks that 32-bit hex immediates are accepted for the `prefetch.*`
8+
## instructions on rv32.
9+
10+
# CHECK-ASM-AND-OBJ: prefetch.i -2048(t0)
11+
# CHECK-ASM: encoding: [0x13,0xe0,0x02,0x80]
12+
prefetch.i 0xfffff800(t0)
13+
# CHECK-ASM-AND-OBJ: prefetch.r -2048(t1)
14+
# CHECK-ASM: encoding: [0x13,0x60,0x13,0x80]
15+
prefetch.r 0xfffff800(t1)
16+
# CHECK-ASM-AND-OBJ: prefetch.w -2048(t2)
17+
# CHECK-ASM: encoding: [0x13,0xe0,0x33,0x80]
18+
prefetch.w 0xfffff800(t2)

0 commit comments

Comments
 (0)