mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-23 16:19:52 +00:00
Print .mask and .fmask with the target streamer.
Testing this also found the missing '\n' after .frame that this patch also fixes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200192 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -91,7 +91,28 @@ void MipsTargetAsmStreamer::emitFrame(unsigned StackReg, unsigned StackSize,
|
||||
OS << "\t.frame\t$"
|
||||
<< StringRef(MipsInstPrinter::getRegisterName(StackReg)).lower() << ","
|
||||
<< StackSize << ",$"
|
||||
<< StringRef(MipsInstPrinter::getRegisterName(ReturnReg)).lower();
|
||||
<< StringRef(MipsInstPrinter::getRegisterName(ReturnReg)).lower() << '\n';
|
||||
}
|
||||
|
||||
// Print a 32 bit hex number with all numbers.
|
||||
static void printHex32(unsigned Value, raw_ostream &OS) {
|
||||
OS << "0x";
|
||||
for (int i = 7; i >= 0; i--)
|
||||
OS.write_hex((Value & (0xF << (i*4))) >> (i*4));
|
||||
}
|
||||
|
||||
void MipsTargetAsmStreamer::emitMask(unsigned CPUBitmask,
|
||||
int CPUTopSavedRegOff) {
|
||||
OS << "\t.mask \t";
|
||||
printHex32(CPUBitmask, OS);
|
||||
OS << ',' << CPUTopSavedRegOff << '\n';
|
||||
}
|
||||
|
||||
void MipsTargetAsmStreamer::emitFMask(unsigned FPUBitmask,
|
||||
int FPUTopSavedRegOff) {
|
||||
OS << "\t.fmask\t";
|
||||
printHex32(FPUBitmask, OS);
|
||||
OS << "," << FPUTopSavedRegOff << '\n';
|
||||
}
|
||||
|
||||
// This part is for ELF object output.
|
||||
@@ -222,3 +243,13 @@ void MipsTargetELFStreamer::emitFrame(unsigned StackReg, unsigned StackSize,
|
||||
unsigned ReturnReg) {
|
||||
// FIXME: implement.
|
||||
}
|
||||
|
||||
void MipsTargetELFStreamer::emitMask(unsigned CPUBitmask,
|
||||
int CPUTopSavedRegOff) {
|
||||
// FIXME: implement.
|
||||
}
|
||||
|
||||
void MipsTargetELFStreamer::emitFMask(unsigned FPUBitmask,
|
||||
int FPUTopSavedRegOff) {
|
||||
// FIXME: implement.
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user