[Mips] TargetStreamer Support for .abicalls and .set pic0.

This patch adds .abicalls and .set pic0 support which
affects the ELF ABI and its flags. In addition the patch uses
a common interface for both the MipsTargetSteamer and
MipsObjectStreamer that both the integrated and standalone
assemblers will use for the output for these directives.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198646 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jack Carter
2014-01-06 23:27:31 +00:00
parent 284c8bc4b0
commit 063564c4c5
9 changed files with 137 additions and 12 deletions

View File

@@ -608,12 +608,10 @@ void MipsAsmPrinter::EmitStartOfAsmFile(Module &M) {
// TODO: Need to add -mabicalls and -mno-abicalls flags.
// Currently we assume that -mabicalls is the default.
if (OutStreamer.hasRawTextSupport()) {
OutStreamer.EmitRawText(StringRef("\t.abicalls"));
Reloc::Model RM = Subtarget->getRelocationModel();
if (RM == Reloc::Static && !Subtarget->hasMips64())
OutStreamer.EmitRawText(StringRef("\t.option\tpic0"));
}
getTargetStreamer().emitDirectiveAbiCalls();
Reloc::Model RM = Subtarget->getRelocationModel();
if (RM == Reloc::Static && !Subtarget->hasMips64())
getTargetStreamer().emitDirectiveOptionPic0();
// Tell the assembler which ABI we are using
if (OutStreamer.hasRawTextSupport())