mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-21 21:29:41 +00:00
[PowerPC] Don't hard-code R2 as register when processing TOC relocations
Instructions that have high-order TOC relocations always carry R2 as their base register, so it does not matter whether we take the register from the instruction or just hard-code it in PPCAsmPrinter. In the future, however, we might want to apply these relocations to instructions using a different register, so taking the register from the instruction is a better thing to do. No change in functionality here, however. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226403 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
180f89537a
commit
341223ee0a
@ -699,7 +699,7 @@ void PPCAsmPrinter::EmitInstruction(const MachineInstr *MI) {
|
||||
OutContext);
|
||||
EmitToStreamer(OutStreamer, MCInstBuilder(PPC::ADDIS8)
|
||||
.addReg(MI->getOperand(0).getReg())
|
||||
.addReg(PPC::X2)
|
||||
.addReg(MI->getOperand(1).getReg())
|
||||
.addExpr(SymGotTprel));
|
||||
return;
|
||||
}
|
||||
@ -778,7 +778,7 @@ void PPCAsmPrinter::EmitInstruction(const MachineInstr *MI) {
|
||||
OutContext);
|
||||
EmitToStreamer(OutStreamer, MCInstBuilder(PPC::ADDIS8)
|
||||
.addReg(MI->getOperand(0).getReg())
|
||||
.addReg(PPC::X2)
|
||||
.addReg(MI->getOperand(1).getReg())
|
||||
.addExpr(SymGotTlsGD));
|
||||
return;
|
||||
}
|
||||
@ -815,7 +815,7 @@ void PPCAsmPrinter::EmitInstruction(const MachineInstr *MI) {
|
||||
OutContext);
|
||||
EmitToStreamer(OutStreamer, MCInstBuilder(PPC::ADDIS8)
|
||||
.addReg(MI->getOperand(0).getReg())
|
||||
.addReg(PPC::X2)
|
||||
.addReg(MI->getOperand(1).getReg())
|
||||
.addExpr(SymGotTlsLD));
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user