mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-27 17:31:33 +00:00
Add support for select constant expressions to the CBE, fixing SIOD
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12589 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0526f01fec
commit
6683dbf32e
@ -388,6 +388,15 @@ void CWriter::printConstant(Constant *CPV) {
|
|||||||
gep_type_end(CPV));
|
gep_type_end(CPV));
|
||||||
Out << "))";
|
Out << "))";
|
||||||
return;
|
return;
|
||||||
|
case Instruction::Select:
|
||||||
|
Out << "(";
|
||||||
|
printConstant(CE->getOperand(0));
|
||||||
|
Out << "?";
|
||||||
|
printConstant(CE->getOperand(1));
|
||||||
|
Out << ":";
|
||||||
|
printConstant(CE->getOperand(2));
|
||||||
|
Out << ")";
|
||||||
|
return;
|
||||||
case Instruction::Add:
|
case Instruction::Add:
|
||||||
case Instruction::Sub:
|
case Instruction::Sub:
|
||||||
case Instruction::Mul:
|
case Instruction::Mul:
|
||||||
|
@ -388,6 +388,15 @@ void CWriter::printConstant(Constant *CPV) {
|
|||||||
gep_type_end(CPV));
|
gep_type_end(CPV));
|
||||||
Out << "))";
|
Out << "))";
|
||||||
return;
|
return;
|
||||||
|
case Instruction::Select:
|
||||||
|
Out << "(";
|
||||||
|
printConstant(CE->getOperand(0));
|
||||||
|
Out << "?";
|
||||||
|
printConstant(CE->getOperand(1));
|
||||||
|
Out << ":";
|
||||||
|
printConstant(CE->getOperand(2));
|
||||||
|
Out << ")";
|
||||||
|
return;
|
||||||
case Instruction::Add:
|
case Instruction::Add:
|
||||||
case Instruction::Sub:
|
case Instruction::Sub:
|
||||||
case Instruction::Mul:
|
case Instruction::Mul:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user