X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=utils%2FTableGen%2FCodeEmitterGen.cpp;h=ae4a6aa445b1ca0f80316202f0a61b2f0751f8e5;hb=d869b3847f1dee78e1e4e1ed3cb41bd3ab0a079c;hp=e2278ad62ca4445bd6103deca89e9cbced655bea;hpb=e3e36263384a7f4662f2eafa090507602a5c391e;p=oota-llvm.git diff --git a/utils/TableGen/CodeEmitterGen.cpp b/utils/TableGen/CodeEmitterGen.cpp index e2278ad62ca..ae4a6aa445b 100644 --- a/utils/TableGen/CodeEmitterGen.cpp +++ b/utils/TableGen/CodeEmitterGen.cpp @@ -100,8 +100,6 @@ void CodeEmitterGen::run(std::ostream &o) { const CodeGenInstruction *CGI = *IN; Record *R = CGI->TheDef; - if (IN != NumberedInstructions.begin()) o << ",\n"; - if (R->getName() == "PHI" || R->getName() == "INLINEASM" || R->getName() == "DBG_LABEL" || @@ -112,7 +110,7 @@ void CodeEmitterGen::run(std::ostream &o) { R->getName() == "INSERT_SUBREG" || R->getName() == "IMPLICIT_DEF" || R->getName() == "SUBREG_TO_REG") { - o << " 0U"; + o << " 0U,\n"; continue; } @@ -125,9 +123,9 @@ void CodeEmitterGen::run(std::ostream &o) { Value |= B->getValue() << (e-i-1); } } - o << " " << Value << "U"; + o << " " << Value << "U," << '\t' << "// " << R->getName() << "\n"; } - o << "\n };\n"; + o << " 0U\n };\n"; // Map to accumulate all the cases. std::map > CaseMap; @@ -193,7 +191,7 @@ void CodeEmitterGen::run(std::ostream &o) { gotOp = true; } - unsigned opMask = (1 << N) - 1; + unsigned opMask = ~0U >> (32-N); int opShift = beginVarBit - N + 1; opMask <<= opShift; opShift = beginInstBit - beginVarBit;