mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-11 07:15:26 +00:00
![Oliver Stannard](/assets/img/avatar_default.png)
Currently, if the assembler encounters an error after parsing (such as an out-of-range fixup), it reports this as a fatal error, and so stops after the first error. However, for most of these there is an obvious way to recover after emitting the error, such as emitting the fixup with a value of zero. This means that we can report on all of the errors in a file, not just the first one. MCContext::reportError records the fact that an error was encountered, so we won't actually emit an object file with the incorrect contents. Differential Revision: http://reviews.llvm.org/D14717 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253328 91177308-0d34-0410-b5e6-96231b3b80d8
27 lines
677 B
ArmAsm
27 lines
677 B
ArmAsm
@ RUN: not llvm-mc -triple armv7-eabi -filetype obj -o - %s 2>&1 \
|
|
@ RUN: | FileCheck %s
|
|
@ RUN: not llvm-mc -triple thumbv7-eabi -filetype obj -o - %s 2>&1 \
|
|
@ RUN: | FileCheck %s
|
|
|
|
.byte target(sbrel)
|
|
@ CHECK: error: relocated expression must be 32-bit
|
|
@ CHECK: .byte target(sbrel)
|
|
@ CHECK: ^
|
|
|
|
.hword target(sbrel)
|
|
@ CHECK: error: relocated expression must be 32-bit
|
|
@ CHECK: .hword target(sbrel)
|
|
@ CHECK: ^
|
|
|
|
.short target(sbrel)
|
|
@ CHECK: error: relocated expression must be 32-bit
|
|
@ CHECK: .short target(sbrel)
|
|
@ CHECK: ^
|
|
|
|
.quad target(sbrel)
|
|
@ CHECK: error: relocated expression must be 32-bit
|
|
@ CHECK: .quad target(sbrel)
|
|
@ CHECK: ^
|
|
|
|
|