forked from OSchip/llvm-project
[Sparc] Fix breakage in r200345
Oops. Don't do build tests on patches like that with --enable-targets=x86_64 llvm-svn: 200355
This commit is contained in:
parent
cbf1a809c3
commit
a86694ca7a
|
@ -70,7 +70,8 @@ namespace {
|
||||||
unsigned AsmVariant, const char *ExtraCode,
|
unsigned AsmVariant, const char *ExtraCode,
|
||||||
raw_ostream &O);
|
raw_ostream &O);
|
||||||
|
|
||||||
void LowerGETPCXAndEmitMCInsts(const MachineInstr *MI);
|
void LowerGETPCXAndEmitMCInsts(const MachineInstr *MI,
|
||||||
|
const MCSubtargetInfo &STI);
|
||||||
|
|
||||||
};
|
};
|
||||||
} // end of anonymous namespace
|
} // end of anonymous namespace
|
||||||
|
@ -192,33 +193,33 @@ void SparcAsmPrinter::LowerGETPCXAndEmitMCInsts(const MachineInstr *MI,
|
||||||
case CodeModel::Small:
|
case CodeModel::Small:
|
||||||
EmitHiLo(OutStreamer, GOTLabel,
|
EmitHiLo(OutStreamer, GOTLabel,
|
||||||
SparcMCExpr::VK_Sparc_HI, SparcMCExpr::VK_Sparc_LO,
|
SparcMCExpr::VK_Sparc_HI, SparcMCExpr::VK_Sparc_LO,
|
||||||
MCRegOP, OutContext);
|
MCRegOP, OutContext, STI);
|
||||||
break;
|
break;
|
||||||
case CodeModel::Medium: {
|
case CodeModel::Medium: {
|
||||||
EmitHiLo(OutStreamer, GOTLabel,
|
EmitHiLo(OutStreamer, GOTLabel,
|
||||||
SparcMCExpr::VK_Sparc_H44, SparcMCExpr::VK_Sparc_M44,
|
SparcMCExpr::VK_Sparc_H44, SparcMCExpr::VK_Sparc_M44,
|
||||||
MCRegOP, OutContext);
|
MCRegOP, OutContext, STI);
|
||||||
MCOperand imm = MCOperand::CreateExpr(MCConstantExpr::Create(12,
|
MCOperand imm = MCOperand::CreateExpr(MCConstantExpr::Create(12,
|
||||||
OutContext));
|
OutContext));
|
||||||
EmitSHL(OutStreamer, MCRegOP, imm, MCRegOP);
|
EmitSHL(OutStreamer, MCRegOP, imm, MCRegOP, STI);
|
||||||
MCOperand lo = createSparcMCOperand(SparcMCExpr::VK_Sparc_L44,
|
MCOperand lo = createSparcMCOperand(SparcMCExpr::VK_Sparc_L44,
|
||||||
GOTLabel, OutContext);
|
GOTLabel, OutContext);
|
||||||
EmitOR(OutStreamer, MCRegOP, lo, MCRegOP);
|
EmitOR(OutStreamer, MCRegOP, lo, MCRegOP, STI);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case CodeModel::Large: {
|
case CodeModel::Large: {
|
||||||
EmitHiLo(OutStreamer, GOTLabel,
|
EmitHiLo(OutStreamer, GOTLabel,
|
||||||
SparcMCExpr::VK_Sparc_HH, SparcMCExpr::VK_Sparc_HM,
|
SparcMCExpr::VK_Sparc_HH, SparcMCExpr::VK_Sparc_HM,
|
||||||
MCRegOP, OutContext);
|
MCRegOP, OutContext, STI);
|
||||||
MCOperand imm = MCOperand::CreateExpr(MCConstantExpr::Create(32,
|
MCOperand imm = MCOperand::CreateExpr(MCConstantExpr::Create(32,
|
||||||
OutContext));
|
OutContext));
|
||||||
EmitSHL(OutStreamer, MCRegOP, imm, MCRegOP);
|
EmitSHL(OutStreamer, MCRegOP, imm, MCRegOP, STI);
|
||||||
// Use register %o7 to load the lower 32 bits.
|
// Use register %o7 to load the lower 32 bits.
|
||||||
MCOperand RegO7 = MCOperand::CreateReg(SP::O7);
|
MCOperand RegO7 = MCOperand::CreateReg(SP::O7);
|
||||||
EmitHiLo(OutStreamer, GOTLabel,
|
EmitHiLo(OutStreamer, GOTLabel,
|
||||||
SparcMCExpr::VK_Sparc_HI, SparcMCExpr::VK_Sparc_LO,
|
SparcMCExpr::VK_Sparc_HI, SparcMCExpr::VK_Sparc_LO,
|
||||||
RegO7, OutContext);
|
RegO7, OutContext, STI);
|
||||||
EmitADD(OutStreamer, MCRegOP, RegO7, MCRegOP);
|
EmitADD(OutStreamer, MCRegOP, RegO7, MCRegOP, STI);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue