[mips] Add assembler support for the .cprestore directive.
authorDaniel Sanders <daniel.sanders@imgtec.com>
Thu, 17 Sep 2015 16:08:39 +0000 (16:08 +0000)
committerDaniel Sanders <daniel.sanders@imgtec.com>
Thu, 17 Sep 2015 16:08:39 +0000 (16:08 +0000)
commit92150c7f1229c69dae893c558430e08c3e899115
tree1e65114a18dae513edc84f6070bd934f8157797d
parentb063ae2f8008c7ff39e44e8a21f19ce0e0654e52
[mips] Add assembler support for the .cprestore directive.

Summary:
This assembler directive is used in O32 PIC to restore the current function's $gp after executing JAL's. The $gp is first stored on the stack at a user-specified offset.
It has the following format: ".cprestore 8" (where 8 is the offset).

This fixes llvm.org/PR20967.

Patch by Toma Tabacu.

Reviewers: seanbruno, tomatabacu

Subscribers: brooks, seanbruno, emaste, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247897 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/Mips/AsmParser/MipsAsmParser.cpp
lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp
lib/Target/Mips/MipsTargetStreamer.h
test/MC/Mips/cprestore-bad.s [new file with mode: 0644]
test/MC/Mips/cprestore-noreorder.s [new file with mode: 0644]
test/MC/Mips/cprestore-reorder.s [new file with mode: 0644]
test/MC/Mips/cprestore-warning-unused.s [new file with mode: 0644]