mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-09 20:13:35 +00:00
Remove SPARC backend getpcx instruction's Uses. Also, insert an assert to
ensure %o7 is not assigned as the destination of getpcx instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123304 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d318fc2ceb
commit
c178308b23
@ -145,6 +145,8 @@ bool SparcAsmPrinter::printGetPCX(const MachineInstr *MI, unsigned opNum,
|
|||||||
case MachineOperand::MO_Register:
|
case MachineOperand::MO_Register:
|
||||||
assert(TargetRegisterInfo::isPhysicalRegister(MO.getReg()) &&
|
assert(TargetRegisterInfo::isPhysicalRegister(MO.getReg()) &&
|
||||||
"Operand is not a physical register ");
|
"Operand is not a physical register ");
|
||||||
|
assert(MO.getReg() != SP::O7 &&
|
||||||
|
"%o7 is assigned as destination for getpcx!");
|
||||||
operand = "%" + LowercaseString(getRegisterName(MO.getReg()));
|
operand = "%" + LowercaseString(getRegisterName(MO.getReg()));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -156,8 +158,8 @@ bool SparcAsmPrinter::printGetPCX(const MachineInstr *MI, unsigned opNum,
|
|||||||
O << "\tcall\t.LLGETPC" << mfNum << '_' << bbNum << '\n' ;
|
O << "\tcall\t.LLGETPC" << mfNum << '_' << bbNum << '\n' ;
|
||||||
|
|
||||||
O << "\t sethi\t"
|
O << "\t sethi\t"
|
||||||
<< "%hi(_GLOBAL_OFFSET_TABLE_+(.-.LLGETPCH" << mfNum << '_' << bbNum << ")), "
|
<< "%hi(_GLOBAL_OFFSET_TABLE_+(.-.LLGETPCH" << mfNum << '_' << bbNum
|
||||||
<< operand << '\n' ;
|
<< ")), " << operand << '\n' ;
|
||||||
|
|
||||||
O << ".LLGETPC" << mfNum << '_' << bbNum << ":\n" ;
|
O << ".LLGETPC" << mfNum << '_' << bbNum << ":\n" ;
|
||||||
O << "\tor\t" << operand
|
O << "\tor\t" << operand
|
||||||
|
@ -205,7 +205,7 @@ class Pseudo<dag outs, dag ins, string asmstr, list<dag> pattern>
|
|||||||
: InstSP<outs, ins, asmstr, pattern>;
|
: InstSP<outs, ins, asmstr, pattern>;
|
||||||
|
|
||||||
// GETPCX for PIC
|
// GETPCX for PIC
|
||||||
let Defs = [O7], Uses = [O7] in {
|
let Defs = [O7] in {
|
||||||
def GETPCX : Pseudo<(outs getPCX:$getpcseq), (ins), "$getpcseq", [] >;
|
def GETPCX : Pseudo<(outs getPCX:$getpcseq), (ins), "$getpcseq", [] >;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user