]> granicus.if.org Git - llvm/commit
[MIPS] Handle PIC load address macro instructions in N64.
authorSimon Dardis <simon.dardis@imgtec.com>
Fri, 30 Jun 2017 15:44:27 +0000 (15:44 +0000)
committerSimon Dardis <simon.dardis@imgtec.com>
Fri, 30 Jun 2017 15:44:27 +0000 (15:44 +0000)
commit333b6cb76040b4d32705e1f16f96d18b2ad7e4d5
tree37de31c9c4a51b214159c2ae18a865af5b1a6f24
parentadc0734b69ffc73195c06bd24c01081992182d83
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306831 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/Mips/AsmParser/MipsAsmParser.cpp
test/MC/Mips/macro-dla-bad.s [new file with mode: 0644]
test/MC/Mips/macro-dla-pic.s [new file with mode: 0644]