mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
back out my previous change, it exposes a latent bug. investigating
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63463 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3edbcada57
commit
9411cd2570
@ -1505,14 +1505,13 @@ void AssemblyWriter::printInstruction(const Instruction &I) {
|
|||||||
const Value *Operand = I.getNumOperands() ? I.getOperand(0) : 0;
|
const Value *Operand = I.getNumOperands() ? I.getOperand(0) : 0;
|
||||||
|
|
||||||
// Special case conditional branches to swizzle the condition out to the front
|
// Special case conditional branches to swizzle the condition out to the front
|
||||||
if (isa<BranchInst>(I) && cast<BranchInst>(I).isConditional()) {
|
if (isa<BranchInst>(I) && I.getNumOperands() > 1) {
|
||||||
BranchInst &BI(cast<BranchInst>(I));
|
|
||||||
Out << ' ';
|
Out << ' ';
|
||||||
writeOperand(BI.getCondition(), true);
|
writeOperand(I.getOperand(2), true);
|
||||||
Out << ", ";
|
Out << ", ";
|
||||||
writeOperand(BI.getSuccessor(0), true);
|
writeOperand(Operand, true);
|
||||||
Out << ", ";
|
Out << ", ";
|
||||||
writeOperand(BI.getSuccessor(1), true);
|
writeOperand(I.getOperand(1), true);
|
||||||
|
|
||||||
} else if (isa<SwitchInst>(I)) {
|
} else if (isa<SwitchInst>(I)) {
|
||||||
// Special case switch statement to get formatting nice and correct...
|
// Special case switch statement to get formatting nice and correct...
|
||||||
|
Loading…
Reference in New Issue
Block a user