mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
Print .frame via the target streamer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200186 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8ab549b856
commit
1943ce9b6e
@ -11,6 +11,7 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "InstPrinter/MipsInstPrinter.h"
|
||||
#include "MipsTargetStreamer.h"
|
||||
#include "MipsMCTargetDesc.h"
|
||||
#include "llvm/MC/MCELF.h"
|
||||
@ -85,6 +86,14 @@ void MipsTargetAsmStreamer::emitDirectiveOptionPic0() {
|
||||
OS << "\t.option\tpic0\n";
|
||||
}
|
||||
|
||||
void MipsTargetAsmStreamer::emitFrame(unsigned StackReg, unsigned StackSize,
|
||||
unsigned ReturnReg) {
|
||||
OS << "\t.frame\t$"
|
||||
<< StringRef(MipsInstPrinter::getRegisterName(StackReg)).lower() << ","
|
||||
<< StackSize << ",$"
|
||||
<< StringRef(MipsInstPrinter::getRegisterName(ReturnReg)).lower();
|
||||
}
|
||||
|
||||
// This part is for ELF object output.
|
||||
MipsTargetELFStreamer::MipsTargetELFStreamer(MCStreamer &S,
|
||||
const MCSubtargetInfo &STI)
|
||||
@ -208,3 +217,8 @@ void MipsTargetELFStreamer::emitDirectiveOptionPic0() {
|
||||
Flags &= ~ELF::EF_MIPS_PIC;
|
||||
MCA.setELFHeaderEFlags(Flags);
|
||||
}
|
||||
|
||||
void MipsTargetELFStreamer::emitFrame(unsigned StackReg, unsigned StackSize,
|
||||
unsigned ReturnReg) {
|
||||
// FIXME: implement.
|
||||
}
|
||||
|
@ -248,11 +248,7 @@ void MipsAsmPrinter::emitFrameDirective() {
|
||||
unsigned returnReg = RI.getRARegister();
|
||||
unsigned stackSize = MF->getFrameInfo()->getStackSize();
|
||||
|
||||
if (OutStreamer.hasRawTextSupport())
|
||||
OutStreamer.EmitRawText("\t.frame\t$" +
|
||||
StringRef(MipsInstPrinter::getRegisterName(stackReg)).lower() +
|
||||
"," + Twine(stackSize) + ",$" +
|
||||
StringRef(MipsInstPrinter::getRegisterName(returnReg)).lower());
|
||||
getTargetStreamer().emitFrame(stackReg, stackSize, returnReg);
|
||||
}
|
||||
|
||||
/// Emit Set directives.
|
||||
|
@ -35,6 +35,8 @@ public:
|
||||
virtual void emitDirectiveEnt(const MCSymbol &Symbol) = 0;
|
||||
virtual void emitDirectiveAbiCalls() = 0;
|
||||
virtual void emitDirectiveOptionPic0() = 0;
|
||||
virtual void emitFrame(unsigned StackReg, unsigned StackSize,
|
||||
unsigned ReturnReg) = 0;
|
||||
};
|
||||
|
||||
// This part is for ascii assembly output
|
||||
@ -59,6 +61,8 @@ public:
|
||||
virtual void emitDirectiveEnt(const MCSymbol &Symbol);
|
||||
virtual void emitDirectiveAbiCalls();
|
||||
virtual void emitDirectiveOptionPic0();
|
||||
virtual void emitFrame(unsigned StackReg, unsigned StackSize,
|
||||
unsigned ReturnReg);
|
||||
};
|
||||
|
||||
// This part is for ELF object output
|
||||
@ -88,6 +92,8 @@ public:
|
||||
virtual void emitDirectiveEnt(const MCSymbol &Symbol);
|
||||
virtual void emitDirectiveAbiCalls();
|
||||
virtual void emitDirectiveOptionPic0();
|
||||
virtual void emitFrame(unsigned StackReg, unsigned StackSize,
|
||||
unsigned ReturnReg);
|
||||
};
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user