mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Improve the efficiency and cleanup writing a bit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5782 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1f862af473
commit
ffd9bf404c
@ -804,20 +804,22 @@ void AssemblyWriter::printInstruction(const Instruction &I) {
|
||||
bool PrintAllTypes = false;
|
||||
const Type *TheType = Operand->getType();
|
||||
|
||||
for (unsigned i = 1, E = I.getNumOperands(); i != E; ++i) {
|
||||
Operand = I.getOperand(i);
|
||||
if (Operand->getType() != TheType) {
|
||||
PrintAllTypes = true; // We have differing types! Print them all!
|
||||
break;
|
||||
// Shift Left & Right print both types even for Ubyte LHS
|
||||
if (isa<ShiftInst>(I)) {
|
||||
PrintAllTypes = true;
|
||||
} else {
|
||||
for (unsigned i = 1, E = I.getNumOperands(); i != E; ++i) {
|
||||
Operand = I.getOperand(i);
|
||||
if (Operand->getType() != TheType) {
|
||||
PrintAllTypes = true; // We have differing types! Print them all!
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Shift Left & Right print both types even for Ubyte LHS
|
||||
if (isa<ShiftInst>(I)) PrintAllTypes = true;
|
||||
|
||||
|
||||
if (!PrintAllTypes) {
|
||||
Out << " ";
|
||||
printType(I.getOperand(0)->getType());
|
||||
printType(TheType);
|
||||
}
|
||||
|
||||
for (unsigned i = 0, E = I.getNumOperands(); i != E; ++i) {
|
||||
|
Loading…
Reference in New Issue
Block a user