1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
llvm-mirror/test/MC/Mips/macro-dla-bad.s
Simon Dardis 06d35c8a0b [MIPS] Handle PIC load address macro instructions in N64.
In particular, use CALL16 (similar to O32) for address loads into T9 for certain
cases.  Otherwise use a %got_disp relocation to load the address of a symbol.
Small offsets (small enough to fit in a 16-bit signed immediate) can be used and
are added to the symbol address after it is loaded from the GOT.  Larger offsets
are currently unsupported and result in an error from the assembler.

Reviewers: sdardis

Reviewed By: sdardis

Patch by: John Baldwin

Subscribers: llvm-commits, seanbruno, arichardson, emaste, dim

Differential Revision: https://reviews.llvm.org/D33948

llvm-svn: 306831
2017-06-30 15:44:27 +00:00

22 lines
1.1 KiB
ArmAsm

# RUN: not llvm-mc %s -arch=mips64 -mcpu=mips3 -target-abi n64 2>&1 | \
# RUN: FileCheck %s
.text
.option pic2
dla $5, symbol+0x8000
# CHECK: :[[@LINE-1]]:3: error: macro instruction uses large offset, which is not currently supported
dla $5, symbol-0x8001
# CHECK: :[[@LINE-1]]:3: error: macro instruction uses large offset, which is not currently supported
dla $5, symbol+0x8000($6)
# CHECK: :[[@LINE-1]]:3: error: macro instruction uses large offset, which is not currently supported
dla $5, symbol-0x8001($6)
# CHECK: :[[@LINE-1]]:3: error: macro instruction uses large offset, which is not currently supported
dla $25, symbol+0x8000
# CHECK: :[[@LINE-1]]:3: error: macro instruction uses large offset, which is not currently supported
dla $25, symbol-0x8001
# CHECK: :[[@LINE-1]]:3: error: macro instruction uses large offset, which is not currently supported
dla $25, symbol+0x8000($6)
# CHECK: :[[@LINE-1]]:3: error: macro instruction uses large offset, which is not currently supported
dla $25, symbol-0x8001($6)
# CHECK: :[[@LINE-1]]:3: error: macro instruction uses large offset, which is not currently supported