mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-23 16:19:52 +00:00
Unify duplicated functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200014 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -63,12 +63,6 @@ void MipsTargetAsmStreamer::emitDirectiveAbiCalls() { OS << "\t.abicalls\n"; }
|
||||
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) {}
|
||||
@@ -105,7 +99,10 @@ void MipsTargetELFStreamer::emitDirectiveSetNoMicroMips() {
|
||||
}
|
||||
|
||||
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() {
|
||||
@@ -128,13 +125,3 @@ void MipsTargetELFStreamer::emitDirectiveOptionPic0() {
|
||||
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user