[mips] Improve support for the .set mips16/nomips16 assembler directives.
authorToma Tabacu <toma.tabacu@imgtec.com>
Tue, 4 Nov 2014 17:18:07 +0000 (17:18 +0000)
committerToma Tabacu <toma.tabacu@imgtec.com>
Tue, 4 Nov 2014 17:18:07 +0000 (17:18 +0000)
commitdd3894aa8f41b027d5bdf937b11b6bb25bd87a38
treeee70c8aa103b944c9d2fb48995a1a7f887653842
parentd0de1a525dc92ec0d8d45b9d4b314b56adac52f4
[mips] Improve support for the .set mips16/nomips16 assembler directives.

Summary:
Appropriately set/clear the FeatureBit for Mips16 when these assembler directives are used and also emit ".set nomips16" (previously, only ".set mips16" was being emitted).

These improvements allow for better testing of the .cpload/.cprestore assembler directives (which are not supposed to work when Mips16 is enabled).

Test Plan: The test is bare-bones because there are no MC tests for Mips16 instructions (there's only one, which checks that the Mips16 ELF header flag gets set), and that suggests to me that it has not been implemented yet in the IAS.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

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

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