[mips] Make the MipsAsmParser capable of knowing whether PIC mode is enabled or not.
authorDaniel Sanders <daniel.sanders@imgtec.com>
Tue, 18 Aug 2015 12:33:54 +0000 (12:33 +0000)
committerDaniel Sanders <daniel.sanders@imgtec.com>
Tue, 18 Aug 2015 12:33:54 +0000 (12:33 +0000)
commit6f65b18a5997ba6f998af46929ba911366c481f8
treeb7314d2fdd1e6bfa36c2846d6dd857f2823afc09
parent0e57d709e93c44f31a13722b224bc8324b9ed5ea
[mips] Make the MipsAsmParser capable of knowing whether PIC mode is enabled or not.

Summary:
This information is needed to decide whether we do the PIC-only JAL expansions or not. It's also needed for an upcoming patch which implements the .cprestore assembler directive (which can only be used effectively in PIC mode).

By making this information available to the MipsAsmParser, we will know when to insert the instructions mandated by the .cprestore assembler directive and we will be able to give some useful warnings when we encounter a potential misuse of this directive.

Patch by Toma Tabacu

Reviewers: dsanders, seanbruno

Subscribers: brooks, seanbruno, rafael, llvm-commits

Differential Revision: http://reviews.llvm.org/D5626

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245291 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/Mips/AsmParser/MipsAsmParser.cpp