reportParseError("unexpected token in statement");
return false;
}
- getTargetStreamer().emitDirectiveSetMips16(true);
+ getTargetStreamer().emitDirectiveSetMips16();
Parser.Lex(); // Consume the EndOfStatement.
return false;
}
void MipsTargetAsmStreamer::emitDirectiveOptionPic0() {
OS << "\t.option\tpic0\n";
}
-void MipsTargetAsmStreamer::emitDirectiveSetMips16(bool IsMips16) {
- if (IsMips16)
- OS << "\t.set\tmips16\n";
- else
- OS << "\t.set\tnomips16\n";
-}
// This part is for ELF object output.
MipsTargetELFStreamer::MipsTargetELFStreamer() : MicroMipsEnabled(false) {}
}
void MipsTargetELFStreamer::emitDirectiveSetMips16() {
- // FIXME: implement.
+ MCAssembler &MCA = getStreamer().getAssembler();
+ unsigned Flags = MCA.getELFHeaderEFlags();
+ Flags |= ELF::EF_MIPS_ARCH_ASE_M16;
+ MCA.setELFHeaderEFlags(Flags);
}
void MipsTargetELFStreamer::emitDirectiveSetNoMips16() {
Flags &= ~ELF::EF_MIPS_PIC;
MCA.setELFHeaderEFlags(Flags);
}
-void MipsTargetELFStreamer::emitDirectiveSetMips16(bool IsMips16) {
- // Don't do anything for .set nomips16
- if (!IsMips16)
- return;
-
- MCAssembler &MCA = getStreamer().getAssembler();
- unsigned Flags = MCA.getELFHeaderEFlags();
- Flags |= ELF::EF_MIPS_ARCH_ASE_M16;
- MCA.setELFHeaderEFlags(Flags);
-}
virtual void emitDirectiveEnt(const MCSymbol &Symbol) = 0;
virtual void emitDirectiveAbiCalls() = 0;
virtual void emitDirectiveOptionPic0() = 0;
- virtual void emitDirectiveSetMips16(bool IsMips16) = 0;
};
// This part is for ascii assembly output
virtual void emitDirectiveEnt(const MCSymbol &Symbol);
virtual void emitDirectiveAbiCalls();
virtual void emitDirectiveOptionPic0();
- virtual void emitDirectiveSetMips16(bool IsMips16);
};
// This part is for ELF object output
virtual void emitDirectiveEnt(const MCSymbol &Symbol);
virtual void emitDirectiveAbiCalls();
virtual void emitDirectiveOptionPic0();
- virtual void emitDirectiveSetMips16(bool IsMips16);
};
}
#endif