1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
llvm-mirror/test/MC/Mips/unsupported-relocation.s
Simon Atanasyan 6611fe0a02 [mips] Show an error on attempt to use 64-bit PC-relative relocation
The following code requests 64-bit PC-relative relocations unsupported
by MIPS ABI. Now it triggers an assertion. It's better to show an error
message.
```
foo:
  .quad bar - foo
```

llvm-svn: 350152
2018-12-29 10:10:02 +00:00

16 lines
516 B
ArmAsm

# RUN: not llvm-mc -triple mips-unknown-linux -filetype=obj -o %t %s 2>&1 \
# RUN: | FileCheck %s
# Check that we emit an error for unsupported relocations instead of crashing.
.globl x
.data
foo:
.byte x
# CHECK: :[[@LINE-1]]:17: error: MIPS does not support one byte relocations
.byte x+1
# CHECK: :[[@LINE-1]]:17: error: MIPS does not support one byte relocations
.quad x-foo
# CHECK: :[[@LINE-1]]:17: error: MIPS does not support 64-bit PC-relative relocations