mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-02 07:11:49 +00:00
[Sparc] Do not hardcode nop in the delay slot of TLS_CALL. Use DelaySlotFiller to fill the delay slot instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192160 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d79f6f786a
commit
3bd3419e86
@ -169,7 +169,7 @@ Filler::findDelayInstr(MachineBasicBlock &MBB,
|
|||||||
if (slot == MBB.begin())
|
if (slot == MBB.begin())
|
||||||
return MBB.end();
|
return MBB.end();
|
||||||
|
|
||||||
if (slot->getOpcode() == SP::RET)
|
if (slot->getOpcode() == SP::RET || slot->getOpcode() == SP::TLS_CALL)
|
||||||
return MBB.end();
|
return MBB.end();
|
||||||
|
|
||||||
if (slot->getOpcode() == SP::RETL) {
|
if (slot->getOpcode() == SP::RETL) {
|
||||||
@ -355,6 +355,7 @@ bool Filler::needsUnimp(MachineBasicBlock::iterator I, unsigned &StructSize)
|
|||||||
case SP::CALL: structSizeOpNum = 1; break;
|
case SP::CALL: structSizeOpNum = 1; break;
|
||||||
case SP::JMPLrr:
|
case SP::JMPLrr:
|
||||||
case SP::JMPLri: structSizeOpNum = 2; break;
|
case SP::JMPLri: structSizeOpNum = 2; break;
|
||||||
|
case SP::TLS_CALL: return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const MachineOperand &MO = I->getOperand(structSizeOpNum);
|
const MachineOperand &MO = I->getOperand(structSizeOpNum);
|
||||||
|
@ -845,10 +845,10 @@ let mayLoad = 1 in
|
|||||||
[(set i32:$dst,
|
[(set i32:$dst,
|
||||||
(tlsld ADDRrr:$addr, tglobaltlsaddr:$sym))]>;
|
(tlsld ADDRrr:$addr, tglobaltlsaddr:$sym))]>;
|
||||||
|
|
||||||
let Uses = [O6], isCall = 1 in
|
let Uses = [O6], isCall = 1, hasDelaySlot = 1 in
|
||||||
def TLS_CALL : InstSP<(outs),
|
def TLS_CALL : InstSP<(outs),
|
||||||
(ins calltarget:$disp, TLSSym:$sym, variable_ops),
|
(ins calltarget:$disp, TLSSym:$sym, variable_ops),
|
||||||
"call $disp, $sym\n\tnop",
|
"call $disp, $sym",
|
||||||
[(tlscall texternalsym:$disp, tglobaltlsaddr:$sym)]> {
|
[(tlscall texternalsym:$disp, tglobaltlsaddr:$sym)]> {
|
||||||
bits<30> disp;
|
bits<30> disp;
|
||||||
let op = 1;
|
let op = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user