mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-03 14:31:10 +00:00
Add CC operand as 4th operand of SUBcc, and mark it as a def.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6a0c6d82a9
commit
98a9c979e2
@ -479,12 +479,11 @@ GetInstructionsByRule(InstructionNode* subtreeRoot,
|
|||||||
mvec[0] = new MachineInstr(SUBcc);
|
mvec[0] = new MachineInstr(SUBcc);
|
||||||
Set3OperandsFromInstr(mvec[0], subtreeRoot, target, discardResult);
|
Set3OperandsFromInstr(mvec[0], subtreeRoot, target, discardResult);
|
||||||
|
|
||||||
if (discardResult)
|
// mark the 4th operand as being a CC register, and a "result"
|
||||||
{// mark the "result" operand as being a CC register
|
mvec[0]->SetMachineOperand(3, MachineOperand::MO_CCRegister,
|
||||||
mvec[0]->SetMachineOperand(2, MachineOperand::MO_CCRegister,
|
subtreeRoot->getValue(), /*def*/ true);
|
||||||
subtreeRoot->getValue());
|
|
||||||
}
|
if (!discardResult)
|
||||||
else
|
|
||||||
{ // recompute bool if needed, using the integer condition codes
|
{ // recompute bool if needed, using the integer condition codes
|
||||||
if (result->getOpcode() == Instruction::SetNE)
|
if (result->getOpcode() == Instruction::SetNE)
|
||||||
discardResult = true;
|
discardResult = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user