mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-19 09:57:42 +00:00
Support more insane CEP's in AsmPrinter (Yes, PyPy folks do really use them).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45172 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1d87cb1c12
commit
feb8893d17
@ -773,9 +773,32 @@ void AsmPrinter::EmitConstantValueOnly(const Constant *CV) {
|
||||
}
|
||||
case Instruction::Add:
|
||||
case Instruction::Sub:
|
||||
case Instruction::And:
|
||||
case Instruction::Or:
|
||||
case Instruction::Xor:
|
||||
O << "(";
|
||||
EmitConstantValueOnly(CE->getOperand(0));
|
||||
O << (Opcode==Instruction::Add ? ") + (" : ") - (");
|
||||
O << ")";
|
||||
switch (Opcode) {
|
||||
case Instruction::Add:
|
||||
O << " + ";
|
||||
break;
|
||||
case Instruction::Sub:
|
||||
O << " - ";
|
||||
break;
|
||||
case Instruction::And:
|
||||
O << " & ";
|
||||
break;
|
||||
case Instruction::Or:
|
||||
O << " | ";
|
||||
break;
|
||||
case Instruction::Xor:
|
||||
O << " ^ ";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
O << "(";
|
||||
EmitConstantValueOnly(CE->getOperand(1));
|
||||
O << ")";
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user