[llvm-commits] [llvm] r157410 - in /llvm/trunk: lib/Target/Mips/MipsAsmPrinter.cpp test/CodeGen/Mips/null.ll
Akira Hatanaka
ahatanaka at mips.com
Thu May 24 11:37:44 PDT 2012
Author: ahatanak
Date: Thu May 24 13:37:43 2012
New Revision: 157410
URL: http://llvm.org/viewvc/llvm-project?rev=157410&view=rev
Log:
Turn on mips16 pseudo op when compiling for mips16.
Expand test case for this.
Patch by Reed Kotler.
Modified:
llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp
llvm/trunk/test/CodeGen/Mips/null.ll
Modified: llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp?rev=157410&r1=157409&r2=157410&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp Thu May 24 13:37:43 2012
@@ -274,8 +274,14 @@
}
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);
}
Modified: llvm/trunk/test/CodeGen/Mips/null.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/null.ll?rev=157410&r1=157409&r2=157410&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/Mips/null.ll (original)
+++ llvm/trunk/test/CodeGen/Mips/null.ll Thu May 24 13:37:43 2012
@@ -5,6 +5,9 @@
entry:
ret i32 0
+; 16: .set mips16 # @main
+; 16: .set nomicromips
+
; 16: jr $ra
}
More information about the llvm-commits
mailing list