[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)
commitcc2502d8f37fbf4ea2473733000b8dc2a13d308e
treee72d346e6817e3f9b38a768280fe14b40bb3650f
parent7d434ce7e5da126ce3d4309580c549e8c6306487
[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

llvm-svn: 221277
llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
llvm/test/MC/Mips/set-mips16-directive.s [new file with mode: 0644]