Turn on mips16 pseudo op when compiling for mips16.

Expand test case for this.

Patch by Reed Kotler.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157410 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Akira Hatanaka 2012-05-24 18:37:43 +00:00
parent 4a5a8949cd
commit c784395a79
2 changed files with 10 additions and 1 deletions

View File

@ -274,8 +274,14 @@ const char *MipsAsmPrinter::getCurrentABIString() const {
}
void MipsAsmPrinter::EmitFunctionEntryLabel() {
if (OutStreamer.hasRawTextSupport())
if (OutStreamer.hasRawTextSupport()) {
if (Subtarget->inMips16Mode())
OutStreamer.EmitRawText(StringRef("\t.set\tmips16"));
else
OutStreamer.EmitRawText(StringRef("\t.set\tnomips16"));
OutStreamer.EmitRawText(StringRef("\t.set\tnomicromips"));
OutStreamer.EmitRawText("\t.ent\t" + Twine(CurrentFnSym->getName()));
}
OutStreamer.EmitLabel(CurrentFnSym);
}

View File

@ -5,6 +5,9 @@ define i32 @main() nounwind {
entry:
ret i32 0
; 16: .set mips16 # @main
; 16: .set nomicromips
; 16: jr $ra
}