Skip to content

Commit 94e492d

Browse files
committed
fix test to correctly handle difference between asm and obj output
1 parent 7cd6711 commit 94e492d

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# RUN: llvm-mc %s -triple=riscv32 -mattr=+experimental-p -M no-aliases -show-encoding \
2-
# RUN: | FileCheck -check-prefixes=CHECK-ASM %s
2+
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
33
# RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+experimental-p < %s \
44
# RUN: | llvm-objdump --mattr=+experimental-p -M no-aliases -d -r --no-print-imm-hex - \
5-
# RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
5+
# RUN: | FileCheck --check-prefixes=CHECK-ASM-AND-OBJ,CHECK-OBJ %s
66

77
# CHECK-ASM-AND-OBJ: clz a0, a1
88
# CHECK-ASM: encoding: [0x13,0x95,0x05,0x60]
@@ -73,6 +73,7 @@ psabs.b t0, t1
7373
# CHECK-ASM-AND-OBJ: plui.h gp, 32
7474
# CHECK-ASM: encoding: [0x9b,0x21,0x20,0xf0]
7575
plui.h gp, 32
76-
# CHECK-ASM-AND-OBJ: plui.h gp, -412
76+
# CHECK-OBJ: plui.h gp, -412
77+
# CHECK-ASM: plui.h gp, 612
7778
# CHECK-ASM: encoding: [0x9b,0xa1,0x64,0xf0]
7879
plui.h gp, 612

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# RUN: llvm-mc %s -triple=riscv64 -mattr=+experimental-p -M no-aliases -show-encoding \
2-
# RUN: | FileCheck -check-prefixes=CHECK-ASM %s
2+
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
33
# RUN: llvm-mc -filetype=obj --triple=riscv64 -mattr=+experimental-p < %s \
44
# RUN: | llvm-objdump --triple=riscv64 --mattr=+experimental-p -M no-aliases --no-print-imm-hex -d -r - \
5-
# RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
5+
# RUN: | FileCheck --check-prefixes=CHECK-ASM-AND-OBJ,CHECK-OBJ %s
66

77
# CHECK-ASM-AND-OBJ: clz a0, a1
88
# CHECK-ASM: encoding: [0x13,0x95,0x05,0x60]
@@ -97,12 +97,14 @@ psabs.b a0, s2
9797
# CHECK-ASM-AND-OBJ: plui.h s2, 4
9898
# CHECK-ASM: encoding: [0x1b,0x29,0x04,0xf0]
9999
plui.h s2, 4
100-
# CHECK-ASM-AND-OBJ: plui.h gp, -412
100+
# CHECK-OBJ: plui.h gp, -412
101+
# CHECK-ASM: plui.h gp, 612
101102
# CHECK-ASM: encoding: [0x9b,0xa1,0x64,0xf0]
102103
plui.h gp, 612
103104
# CHECK-ASM-AND-OBJ: plui.w a2, 1
104105
# CHECK-ASM: encoding: [0x1b,0x26,0x01,0xf2]
105106
plui.w a2, 1
106-
# CHECK-ASM-AND-OBJ: plui.w a2, -1
107+
# CHECK-OBJ: plui.w a2, -1
108+
# CHECK-ASM: plui.w a2, 1023
107109
# CHECK-ASM: encoding: [0x1b,0xa6,0xff,0xf3]
108110
plui.w a2, 1023

0 commit comments

Comments
 (0)