mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-12 13:38:21 +00:00
Add <imp-def> and <imp-kill> operands when replacing virtual sub-register defs and kills.
An instruction like this: %reg1097:1<def> = VMOVSR %R3<kill>, 14, %reg0 Must be replaced with this when substituting physical registers: %S0<def> = VMOVSR %R3<kill>, 14, %reg0, %D0<imp-def> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92812 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1314,3 +1314,12 @@ bool MachineInstr::addRegisterDead(unsigned IncomingReg,
|
||||
true /*IsDead*/));
|
||||
return true;
|
||||
}
|
||||
|
||||
void MachineInstr::addRegisterDefined(unsigned IncomingReg,
|
||||
const TargetRegisterInfo *RegInfo) {
|
||||
MachineOperand *MO = findRegisterDefOperand(IncomingReg, false, RegInfo);
|
||||
if (!MO || MO->getSubReg())
|
||||
addOperand(MachineOperand::CreateReg(IncomingReg,
|
||||
true /*IsDef*/,
|
||||
true /*IsImp*/));
|
||||
}
|
||||
|
Reference in New Issue
Block a user