The issue is uncovered by #47698: for assembly files, -triple= specifies the full target triple while -arch= merely sets the architecture part of the default target triple, leaving a target triple which may not make sense, e.g. riscv64-apple-darwin. Therefore, -arch= is error-prone and not recommended for tests. The issue has been benign as we recognize $unknown-apple-darwin as ELF instead of rejecting it outrightly. Due to the nature of the issue, we don't see the issue in tests using architectures that any of Mach-O/COFF/XCOFF supports.
11 lines
377 B
ArmAsm
11 lines
377 B
ArmAsm
# RUN: not llvm-mc -triple=mips -mcpu=mips32r2 -mattr=+mips16 < %s 2> %t
|
|
# RUN: FileCheck %s < %t
|
|
|
|
# Instructions which are invalid.
|
|
|
|
$label:
|
|
nop 4 # CHECK: :[[@LINE]]:7: error: invalid operand for instruction
|
|
nop $4 # CHECK: :[[@LINE]]:7: error: invalid operand for instruction
|
|
nop $label # CHECK: :[[@LINE]]:7: error: invalid operand for instruction
|
|
|