forked from OSchip/llvm-project
[NFC] Disallow unused prefixes under MC/RISCV
Differential Revision: https://reviews.llvm.org/D94836
This commit is contained in:
parent
d302398ff0
commit
aa3d4d9939
|
@ -1,2 +1,10 @@
|
|||
from lit.llvm.subst import ToolSubst
|
||||
|
||||
if not 'RISCV' in config.root.targets:
|
||||
config.unsupported = True
|
||||
|
||||
fc = ToolSubst('FileCheck', unresolved='fatal')
|
||||
# Insert this first. Then, we'll first update the blank FileCheck command; then,
|
||||
# the default substitution of FileCheck will replace it to its full path.
|
||||
config.substitutions.insert(0, (fc.regex,
|
||||
'FileCheck --allow-unused-prefixes=false'))
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
# RUN: llvm-mc %s -triple=riscv32 -mattr=+c -riscv-no-aliases -show-encoding \
|
||||
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
|
||||
# RUN: | FileCheck --check-prefix=CHECK-ASM %s
|
||||
# RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+c < %s \
|
||||
# RUN: | llvm-objdump --mattr=+c -M no-aliases -d -r - \
|
||||
# RUN: | FileCheck --check-prefixes=CHECK-OBJ,CHECK-ASM-AND-OBJ %s
|
||||
# RUN: | FileCheck --check-prefix=CHECK-OBJ %s
|
||||
#
|
||||
# RUN: not llvm-mc -triple riscv32 \
|
||||
# RUN: -riscv-no-aliases -show-encoding < %s 2>&1 \
|
||||
# RUN: | FileCheck -check-prefixes=CHECK-NO-EXT %s
|
||||
# RUN: | FileCheck --check-prefix=CHECK-NO-EXT %s
|
||||
# RUN: not llvm-mc -triple riscv64 -mattr=+c \
|
||||
# RUN: -riscv-no-aliases -show-encoding < %s 2>&1 \
|
||||
# RUN: | FileCheck -check-prefixes=CHECK-NO-RV32 %s
|
||||
# RUN: | FileCheck --check-prefix=CHECK-NO-RV32 %s
|
||||
# RUN: not llvm-mc -triple riscv64 \
|
||||
# RUN: -riscv-no-aliases -show-encoding < %s 2>&1 \
|
||||
# RUN: | FileCheck -check-prefixes=CHECK-NO-RV32-AND-EXT %s
|
||||
# RUN: | FileCheck --check-prefix=CHECK-NO-RV32-AND-EXT %s
|
||||
|
||||
# CHECK-OBJ: c.jal 0x7fe
|
||||
# CHECK-ASM: c.jal 2046
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
|
||||
# RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+experimental-zfh < %s \
|
||||
# RUN: | llvm-objdump --mattr=+experimental-zfh -M no-aliases -d -r - \
|
||||
# RUN: | FileCheck -check-prefixes=CHECK-OBJ,CHECK-ASM-AND-OBJ %s
|
||||
# RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
|
||||
# RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+experimental-zfh < %s \
|
||||
# RUN: | llvm-objdump --mattr=+experimental-zfh -M no-aliases -d -r - \
|
||||
# RUN: | FileCheck -check-prefixes=CHECK-OBJ,CHECK-ASM-AND-OBJ %s
|
||||
# RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
|
||||
|
||||
# CHECK-ASM-AND-OBJ: flh ft0, 12(a0)
|
||||
# CHECK-ASM: encoding: [0x07,0x10,0xc5,0x00]
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
|
||||
# RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+experimental-zfh < %s \
|
||||
# RUN: | llvm-objdump --mattr=+experimental-zfh -M no-aliases -d -r - \
|
||||
# RUN: | FileCheck -check-prefixes=CHECK-OBJ,CHECK-ASM-AND-OBJ %s
|
||||
# RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
|
||||
#
|
||||
# RUN: not llvm-mc -triple riscv32 -mattr=+experimental-zfh < %s 2>&1 \
|
||||
# RUN: | FileCheck -check-prefix=CHECK-RV32 %s
|
||||
|
|
Loading…
Reference in New Issue