mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
Load & StoreInst no longer derive from MemAccessInst, so we don't have
to handle indexing anymore git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3484 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -847,10 +847,8 @@ void CWriter::printIndexingExpression(Value *Ptr, User::op_iterator I,
|
||||
} else { // Performing array indexing. Just skip the 0
|
||||
++I;
|
||||
}
|
||||
} else if (HasImplicitAddress) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
for (; I != E; ++I)
|
||||
if ((*I)->getType() == Type::UIntTy) {
|
||||
Out << "[";
|
||||
@@ -862,11 +860,13 @@ void CWriter::printIndexingExpression(Value *Ptr, User::op_iterator I,
|
||||
}
|
||||
|
||||
void CWriter::visitLoadInst(LoadInst &I) {
|
||||
printIndexingExpression(I.getPointerOperand(), I.idx_begin(), I.idx_end());
|
||||
Out << "*";
|
||||
writeOperand(I.getOperand(0));
|
||||
}
|
||||
|
||||
void CWriter::visitStoreInst(StoreInst &I) {
|
||||
printIndexingExpression(I.getPointerOperand(), I.idx_begin(), I.idx_end());
|
||||
Out << "*";
|
||||
writeOperand(I.getPointerOperand());
|
||||
Out << " = ";
|
||||
writeOperand(I.getOperand(0));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user