Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Side by Side Diff: src/PNaClTranslator.cpp

Issue 773583004: Subzero: Fix the g++ build (e.g. Windows). (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« src/IceOperand.cpp ('K') | « src/IceOperand.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1663 matching lines...) Expand 10 before | Expand all | Expand 10 after
1674 case naclbitc::ICMP_SGE: 1674 case naclbitc::ICMP_SGE:
1675 Cond = Ice::InstIcmp::Sge; 1675 Cond = Ice::InstIcmp::Sge;
1676 return true; 1676 return true;
1677 case naclbitc::ICMP_SLT: 1677 case naclbitc::ICMP_SLT:
1678 Cond = Ice::InstIcmp::Slt; 1678 Cond = Ice::InstIcmp::Slt;
1679 return true; 1679 return true;
1680 case naclbitc::ICMP_SLE: 1680 case naclbitc::ICMP_SLE:
1681 Cond = Ice::InstIcmp::Sle; 1681 Cond = Ice::InstIcmp::Sle;
1682 return true; 1682 return true;
1683 default: 1683 default:
1684 // Make sure Cond is always initialized.
1685 Cond = static_cast<Ice::InstIcmp::ICond>(0);
1684 return false; 1686 return false;
1685 } 1687 }
1686 } 1688 }
1687 1689
1688 // Converts PNaCl bitcode Fcmp operator to corresponding ICE op. 1690 // Converts PNaCl bitcode Fcmp operator to corresponding ICE op.
1689 // Returns true if able to convert, false otherwise. 1691 // Returns true if able to convert, false otherwise.
1690 bool convertNaClBitcFCompOpToIce(uint64_t Op, 1692 bool convertNaClBitcFCompOpToIce(uint64_t Op,
1691 Ice::InstFcmp::FCond &Cond) const { 1693 Ice::InstFcmp::FCond &Cond) const {
1692 switch (Op) { 1694 switch (Op) {
1693 case naclbitc::FCMP_FALSE: 1695 case naclbitc::FCMP_FALSE:
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
1732 case naclbitc::FCMP_ULE: 1734 case naclbitc::FCMP_ULE:
1733 Cond = Ice::InstFcmp::Ule; 1735 Cond = Ice::InstFcmp::Ule;
1734 return true; 1736 return true;
1735 case naclbitc::FCMP_UNE: 1737 case naclbitc::FCMP_UNE:
1736 Cond = Ice::InstFcmp::Une; 1738 Cond = Ice::InstFcmp::Une;
1737 return true; 1739 return true;
1738 case naclbitc::FCMP_TRUE: 1740 case naclbitc::FCMP_TRUE:
1739 Cond = Ice::InstFcmp::True; 1741 Cond = Ice::InstFcmp::True;
1740 return true; 1742 return true;
1741 default: 1743 default:
1744 // Make sure Cond is always initialized.
1745 Cond = static_cast<Ice::InstFcmp::FCond>(0);
1742 return false; 1746 return false;
1743 } 1747 }
1744 } 1748 }
1745 1749
1746 // Creates an error instruction, generating a value of type Ty, and 1750 // Creates an error instruction, generating a value of type Ty, and
1747 // adds a placeholder so that instruction indices line up. 1751 // adds a placeholder so that instruction indices line up.
1748 // Some instructions, such as a call, will not generate a value 1752 // Some instructions, such as a call, will not generate a value
1749 // if the return type is void. In such cases, a placeholder value 1753 // if the return type is void. In such cases, a placeholder value
1750 // for the badly formed instruction is not needed. Hence, if Ty is 1754 // for the badly formed instruction is not needed. Hence, if Ty is
1751 // void, an error instruction is not appended. 1755 // void, an error instruction is not appended.
(...skipping 1186 matching lines...) Expand 10 before | Expand all | Expand 10 after
2938 2942
2939 if (TopLevelBlocks != 1) { 2943 if (TopLevelBlocks != 1) {
2940 errs() << IRFilename 2944 errs() << IRFilename
2941 << ": Contains more than one module. Found: " << TopLevelBlocks 2945 << ": Contains more than one module. Found: " << TopLevelBlocks
2942 << "\n"; 2946 << "\n";
2943 ErrorStatus = true; 2947 ErrorStatus = true;
2944 } 2948 }
2945 } 2949 }
2946 2950
2947 } // end of namespace Ice 2951 } // end of namespace Ice
OLDNEW
« src/IceOperand.cpp ('K') | « src/IceOperand.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698