OLD | NEW |
1 //===- subzero/src/PNaClTranslator.cpp - ICE from bitcode -----------------===// | 1 //===- subzero/src/PNaClTranslator.cpp - ICE from bitcode -----------------===// |
2 // | 2 // |
3 // The Subzero Code Generator | 3 // The Subzero Code Generator |
4 // | 4 // |
5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
7 // | 7 // |
8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
9 // | 9 // |
10 // This file implements the PNaCl bitcode file to Ice, to machine code | 10 // This file implements the PNaCl bitcode file to Ice, to machine code |
(...skipping 1590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1601 if (Index->getType() != Ice::IceType_i32) { | 1601 if (Index->getType() != Ice::IceType_i32) { |
1602 std::string Buffer; | 1602 std::string Buffer; |
1603 raw_string_ostream StrBuf(Buffer); | 1603 raw_string_ostream StrBuf(Buffer); |
1604 StrBuf << "Insertelement index " << *Index << " not i32. Found: " | 1604 StrBuf << "Insertelement index " << *Index << " not i32. Found: " |
1605 << Index->getType(); | 1605 << Index->getType(); |
1606 Error(StrBuf.str()); | 1606 Error(StrBuf.str()); |
1607 } | 1607 } |
1608 // TODO(kschimpf): Restrict index to a legal constant index (once | 1608 // TODO(kschimpf): Restrict index to a legal constant index (once |
1609 // constants can be defined). | 1609 // constants can be defined). |
1610 CurrentNode->appendInst(Ice::InstInsertElement::create( | 1610 CurrentNode->appendInst(Ice::InstInsertElement::create( |
1611 Func, getNextInstVar(EltType), Vec, Elt, Index)); | 1611 Func, getNextInstVar(VecType), Vec, Elt, Index)); |
1612 break; | 1612 break; |
1613 } | 1613 } |
1614 case naclbitc::FUNC_CODE_INST_CMP2: { | 1614 case naclbitc::FUNC_CODE_INST_CMP2: { |
1615 // CMP2: [opval, opval, pred] | 1615 // CMP2: [opval, opval, pred] |
1616 if (!isValidRecordSize(3, "function block compare")) | 1616 if (!isValidRecordSize(3, "function block compare")) |
1617 return; | 1617 return; |
1618 Ice::Operand *Op1 = getRelativeOperand(Values[0], BaseIndex); | 1618 Ice::Operand *Op1 = getRelativeOperand(Values[0], BaseIndex); |
1619 Ice::Operand *Op2 = getRelativeOperand(Values[1], BaseIndex); | 1619 Ice::Operand *Op2 = getRelativeOperand(Values[1], BaseIndex); |
1620 Ice::Type Op1Type = Op1->getType(); | 1620 Ice::Type Op1Type = Op1->getType(); |
1621 Ice::Type Op2Type = Op2->getType(); | 1621 Ice::Type Op2Type = Op2->getType(); |
(...skipping 809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2431 | 2431 |
2432 if (TopLevelBlocks != 1) { | 2432 if (TopLevelBlocks != 1) { |
2433 errs() << IRFilename | 2433 errs() << IRFilename |
2434 << ": Contains more than one module. Found: " << TopLevelBlocks | 2434 << ": Contains more than one module. Found: " << TopLevelBlocks |
2435 << "\n"; | 2435 << "\n"; |
2436 ErrorStatus = true; | 2436 ErrorStatus = true; |
2437 } | 2437 } |
2438 } | 2438 } |
2439 | 2439 |
2440 } // end of namespace Ice | 2440 } // end of namespace Ice |
OLD | NEW |