mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-31 09:32:11 +00:00
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:
parent
4a5a8949cd
commit
c784395a79
@ -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);
|
||||
}
|
||||
|
||||
|
@ -5,6 +5,9 @@ define i32 @main() nounwind {
|
||||
entry:
|
||||
ret i32 0
|
||||
|
||||
; 16: .set mips16 # @main
|
||||
; 16: .set nomicromips
|
||||
|
||||
; 16: jr $ra
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user