harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcfi...@apache.org
Subject svn commit: r659108 [4/19] - in /harmony/enhanced/drlvm/trunk/vm: em/src/ gc_gen/src/common/ gc_gen/src/mark_compact/ gc_gen/src/mark_sweep/ gc_gen/src/semi_space/ gc_gen/src/trace_forward/ include/open/ interpreter/src/ jitrino/src/codegenerator/ jitr...
Date Thu, 22 May 2008 13:34:09 GMT
Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32GCSafePoints.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32GCSafePoints.cpp?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32GCSafePoints.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32GCSafePoints.cpp Thu May 22 06:33:38 2008
@@ -49,9 +49,9 @@
 // Helper function, removes element idx from vector in O(1) time
 // Moves last element in vector to idx and reduce size by 1
 // WARN: elements order could be changed!
-static void removeElementAt(GCSafePointPairs& pairs, uint32 idx) {
+static void removeElementAt(GCSafePointPairs& pairs, U_32 idx) {
     assert(!pairs.empty());
-    uint32 newSize = (uint32)pairs.size() - 1;
+    U_32 newSize = (U_32)pairs.size() - 1;
     assert(idx<=newSize);
     if (idx < newSize) {
         pairs[idx] = pairs[newSize];
@@ -62,7 +62,7 @@
 
 void GCSafePointsInfo::removePairByMPtrOpnd(GCSafePointPairs& pairs, const Opnd* mptr) const {
 #ifdef _DEBUG_
-    uint32 nPairs = 0;
+    U_32 nPairs = 0;
 #endif 
     for (int i = (int)pairs.size(); --i>=0;) {
         MPtrPair& p = pairs[i];
@@ -121,8 +121,8 @@
 }
 
 
-uint32 GCSafePointsInfo::getNumSafePointsInBlock(const Node* b, const GCSafePointPairsMap* pairsMap ) {
-    uint32 n = 0;
+U_32 GCSafePointsInfo::getNumSafePointsInBlock(const Node* b, const GCSafePointPairsMap* pairsMap ) {
+    U_32 n = 0;
     for (Inst * inst=(Inst*)b->getFirstInst(); inst!=NULL; inst=inst->getNextInst()){
         if (isGCSafePoint(inst)) {
             if (pairsMap!=NULL) { // if pairs!=NULL counts only gcpoints with non-empty pairs
@@ -173,11 +173,11 @@
     for (Nodes::const_iterator it = nodes.begin(), end = nodes.end(); it!=end; ++it) {
         Node* node = *it;
         if (node->isBlockNode()) {
-            uint32 numInsts = node->getInstCount();
+            U_32 numInsts = node->getInstCount();
             if (numInsts < LIVENESS_FILTER_INST_INTERVAL) {
                 continue;
             }
-            uint32 objOps  = 0;
+            U_32 objOps  = 0;
             for (Inst* inst = (Inst*)node->getLastInst(); inst!=NULL; inst = inst->getPrevInst()) {
                 if (inst->getOpndCount() == 0 && ((inst->getKind() == Inst::Kind_MethodEndPseudoInst) 
                         || (inst->getKind() == Inst::Kind_MethodEntryPseudoInst))
@@ -250,14 +250,14 @@
     }
         
     GCSafePointPairs tmpPairs(mm);
-    uint32 nIterations = lt->getMaxLoopDepth() + 1;
+    U_32 nIterations = lt->getMaxLoopDepth() + 1;
     bool changed = true;
     bool restart = false;
 
 #ifdef _DEBUG 
     nIterations++; //one more extra iteration to check on debug that nothing changed
 #endif 
-    for (uint32 iteration = 0; iteration < nIterations ; ) {
+    for (U_32 iteration = 0; iteration < nIterations ; ) {
         changed = false;
         for (Nodes::const_reverse_iterator it = postOrderedNodes.rbegin(), end = postOrderedNodes.rend(); it!=end; ++it) {
             Node* node = *it;
@@ -265,7 +265,7 @@
                 continue;
             }
             tmpPairs.clear();
-            uint32 instsBefore = instsAdded;
+            U_32 instsBefore = instsAdded;
             derivePairsOnEntry(node, tmpPairs);
             if (instsBefore!=instsAdded) {
                 restart = true;
@@ -318,7 +318,7 @@
 #endif
 }
 
-static inline int adjustOffsets(int32 offsetBefore, int32 dOffset) {
+static inline int adjustOffsets(I_32 offsetBefore, I_32 dOffset) {
     if (offsetBefore == MPTR_OFFSET_UNKNOWN || dOffset == MPTR_OFFSET_UNKNOWN) {
         return MPTR_OFFSET_UNKNOWN;
     }
@@ -337,13 +337,13 @@
 #endif
 }
 
-int32 GCSafePointsInfo::getOffsetFromImmediate(Opnd* offsetOpnd) const {
+I_32 GCSafePointsInfo::getOffsetFromImmediate(Opnd* offsetOpnd) const {
     if (offsetOpnd->isPlacedIn(OpndKind_Immediate)) {
         if (offsetOpnd->getImmValue() == 0 && offsetOpnd->getRuntimeInfo()!=NULL) {
             irm.resolveRuntimeInfo(offsetOpnd);
         }
         assert(!isHeapBase(offsetOpnd));
-        return (int32)offsetOpnd->getImmValue();
+        return (I_32)offsetOpnd->getImmValue();
     }
     return MPTR_OFFSET_UNKNOWN;
 }
@@ -395,7 +395,7 @@
 static void add_static(Opnd* opnd, StlSet<Opnd*>& set, Opnd* cause) {
     set.insert(opnd);
     if (Log::isEnabled()) {
-        Log::out()<<"Registering as static opnd, firstId="<<opnd->getFirstId()<<" reason-opndid:"<<(cause?cause->getFirstId() : (uint32)-1)<<std::endl;
+        Log::out()<<"Registering as static opnd, firstId="<<opnd->getFirstId()<<" reason-opndid:"<<(cause?cause->getFirstId() : (U_32)-1)<<std::endl;
     }
 }
 
@@ -437,8 +437,8 @@
     runLivenessFilter(inst, res);//filter pairs with dead mptrs from list
 
     Inst::Opnds opnds(inst, Inst::OpndRole_Explicit | Inst::OpndRole_Auxilary |Inst::OpndRole_UseDef);
-    uint32 defIndex = opnds.begin();
-    uint32 useIndex1 = opnds.next(defIndex);
+    U_32 defIndex = opnds.begin();
+    U_32 useIndex1 = opnds.next(defIndex);
 
     if (defIndex >= opnds.end() || useIndex1 >= opnds.end() 
         || (inst->getOpndRoles(defIndex) & Inst::OpndRole_Def) == 0 
@@ -474,21 +474,21 @@
         } else { //def of mptr
             // detect which operand is base
             Opnd* fromOpnd = inst->getOpnd(useIndex1);
-            uint32 useIndex2 = opnds.next(useIndex1);
+            U_32 useIndex2 = opnds.next(useIndex1);
             Opnd* fromOpnd2 = useIndex2!=opnds.end() ? inst->getOpnd(useIndex2) : NULL;
             if (!(fromOpnd->getType()->isObject() || fromOpnd->getType()->isManagedPtr())) {
                 assert(fromOpnd2!=NULL);
                 Opnd* tmp = fromOpnd; fromOpnd = fromOpnd2; fromOpnd2 = tmp;
             }
             assert(fromOpnd->getType()->isObject() || fromOpnd->getType()->isManagedPtr());
-            int32 offset = MPTR_OFFSET_UNKNOWN;
+            I_32 offset = MPTR_OFFSET_UNKNOWN;
             if (inst->getMnemonic() == Mnemonic_LEA) {
                 assert(fromOpnd->isPlacedIn(OpndKind_Memory));
                 Opnd* scaleOpnd = fromOpnd->getMemOpndSubOpnd(MemOpndSubOpndKind_Scale);
                 if (scaleOpnd == NULL) {
                     Opnd* displOpnd = fromOpnd->getMemOpndSubOpnd(MemOpndSubOpndKind_Displacement);
                     assert(displOpnd!=NULL);
-                    offset = (int32)displOpnd->getImmValue();
+                    offset = (I_32)displOpnd->getImmValue();
                 }
                 fromOpnd = fromOpnd->getMemOpndSubOpnd(MemOpndSubOpndKind_Base);
             } else if (fromOpnd2!=NULL) {
@@ -512,7 +512,7 @@
             //Do nothing, calls return only bases
         } else {
             Opnd* fromOpnd = NULL;
-            int32 offset = 0;
+            I_32 offset = 0;
             Mnemonic mn = inst->getMnemonic();
 
             Mnemonic conditionalMnem = getBaseConditionMnemonic(mn);
@@ -549,7 +549,7 @@
                         if (scaleOpnd == NULL) {
                             Opnd* displOpnd = fromOpnd->getMemOpndSubOpnd(MemOpndSubOpndKind_Displacement);
                             assert(displOpnd!=NULL);
-                            offset = (int32)displOpnd->getImmValue();
+                            offset = (I_32)displOpnd->getImmValue();
                         } else {
                             offset = MPTR_OFFSET_UNKNOWN;
                         }
@@ -604,9 +604,9 @@
 
     //step 2: merge pairs with the same (mptr, base) and process ambiguos pairs
     bool needToFilterDeadPairs = false;
-    uint32 instsAddedBefore = instsAdded;
+    U_32 instsAddedBefore = instsAdded;
     std::sort(res.begin(), res.end());
-    for (uint32 i=0, n = (uint32)res.size(); i < n; i++) {
+    for (U_32 i=0, n = (U_32)res.size(); i < n; i++) {
         MPtrPair& p1 = res[i];
         Opnd* newBase = NULL; //new base opnd to merge ambiguos mptrs
         while (i+1 < n) {
@@ -622,7 +622,7 @@
                     if (newBase == NULL) { //first pass for this ambiguous mptrs fix them all
                         newBase = irm.newOpnd(p1.base->getType());
                         opndsAdded++;
-                        uint32 dInsts = 0;
+                        U_32 dInsts = 0;
                         for (Edges::const_iterator ite = edges.begin(), ende = edges.end(); ite!=ende; ++ite) {
                             Edge* edge = *ite;
                             Node * predNode =edge->getSourceNode();
@@ -688,12 +688,12 @@
         if (!node->isBlockNode()) {
             continue;
         }
-        uint32 nSafePoints = getNumSafePointsInBlock((BasicBlock*)node, &pairsByGCSafePointInstId);
+        U_32 nSafePoints = getNumSafePointsInBlock((BasicBlock*)node, &pairsByGCSafePointInstId);
         if (nSafePoints == 0) {
             continue;
         }
         // ok this basic block has safepoints        
-        uint32 nSafePointsTmp = nSafePoints;
+        U_32 nSafePointsTmp = nSafePoints;
         // remove pairs with dead mptr, use liveness to do it;
         ls.clear();
         irm.getLiveAtExit(node, ls);
@@ -746,10 +746,10 @@
                 Node * predNode2 =edge2->getSourceNode();
                 const GCSafePointPairs& pairs2 = *pairsByNode[predNode2->getDfNum()];
                 //now check that for every mptr in pairs1 there is a pair in pairs2 with the same mptr
-                for (uint32 i1 = 0, n1 = (uint32)pairs1.size();i1<n1; i1++) {
+                for (U_32 i1 = 0, n1 = (U_32)pairs1.size();i1<n1; i1++) {
                     const MPtrPair& p1 = pairs1[i1];
                     if (ls->getBit(p1.mptr->getId())) {
-                        for (uint32 i2 = 0; ; i2++) {
+                        for (U_32 i2 = 0; ; i2++) {
                             assert(i2 < pairs2.size());
                             const MPtrPair& p2 = pairs2[i2];
                             if (p1.mptr == p2.mptr) {
@@ -759,10 +759,10 @@
                     }
                 }
                 // and vice versa
-                for (uint32 i2 = 0, n2 = (uint32)pairs2.size();i2<n2; i2++) {
+                for (U_32 i2 = 0, n2 = (U_32)pairs2.size();i2<n2; i2++) {
                     const MPtrPair& p2 = pairs2[i2];
                     if (ls->getBit(p2.mptr->getId())) {
-                        for (uint32 i1 = 0; ; i1++) {
+                        for (U_32 i1 = 0; ; i1++) {
                             assert(i1 < pairs1.size());
                             const MPtrPair& p1 = pairs1[i1];
                             if (p1.mptr == p2.mptr) {
@@ -783,18 +783,18 @@
     }
     AutoTimer tm(phase2Checker);
     const Nodes& nodes = irm.getFlowGraph()->getNodes();
-    uint32 nOpnds = irm.getOpndCount();
+    U_32 nOpnds = irm.getOpndCount();
     BitSet ls(mm, nOpnds);
     for (Nodes::const_iterator it = nodes.begin(), end = nodes.end(); it!=end; ++it) {
         Node* node = *it;
         if (!node->isBlockNode()) {
             continue;
         }
-        uint32 nSafePoints = getNumSafePointsInBlock((BasicBlock*)node);
+        U_32 nSafePoints = getNumSafePointsInBlock((BasicBlock*)node);
         if (nSafePoints== 0) {
             continue;
         }
-        uint32 nSafePointsTmp = nSafePoints;
+        U_32 nSafePointsTmp = nSafePoints;
         irm.getLiveAtExit(node, ls);
         for (Inst * inst=(Inst*)node->getLastInst(); nSafePointsTmp > 0; inst=inst->getPrevInst()) {
             assert(inst!=NULL);
@@ -810,7 +810,7 @@
                         if (staticMptrs.find(opnd)!= staticMptrs.end()) {
                             continue;
                         }
-                        for (uint32 j=0; ; j++) {
+                        for (U_32 j=0; ; j++) {
                             assert(j<pairs.size());
                             const MPtrPair&  pair = pairs[j];
                             if (pair.mptr == opnd) {
@@ -825,7 +825,7 @@
     }
 }
 
-static uint32 select_1st(const std::pair<uint32, GCSafePointPairs*>& p) {return p.first;}
+static U_32 select_1st(const std::pair<U_32, GCSafePointPairs*>& p) {return p.first;}
 
 
 void GCSafePointsInfo::dump(const char* stage) const {
@@ -834,13 +834,13 @@
     Log::out()<<"========================================================================"<<std::endl;
     //sort by inst id
     const GCSafePointPairsMap& map = pairsByGCSafePointInstId;
-    StlVector<uint32> insts(mm, map.size());
+    StlVector<U_32> insts(mm, map.size());
     std::transform(map.begin(), map.end(), insts.begin(), select_1st);
     std::sort(insts.begin(), insts.end());
     
     //for every inst sort by mptr id and dump
     for (size_t i = 0; i<insts.size(); i++) {
-        uint32 id = insts[i];
+        U_32 id = insts[i];
         const GCSafePointPairs* pairs = map.find(id)->second;
         Log::out()<<"inst="<<id<<" num_pairs="<<pairs->size()<<std::endl;
         GCSafePointPairs cloned = *pairs;
@@ -876,7 +876,7 @@
     AutoTimer tm(saveResultsTimer);
     const Nodes& nodes = irManager->getFlowGraph()->getNodes();
     StlVector<Opnd*> basesAndMptrs(mm); 
-    StlVector<int32> offsets(mm);
+    StlVector<I_32> offsets(mm);
     for (Nodes::const_iterator it = nodes.begin(), end = nodes.end(); it!=end; ++it) {
         Node *node = *it;
         if (!node->isBlockNode()) {

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32GCSafePoints.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32GCSafePoints.h?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32GCSafePoints.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32GCSafePoints.h Thu May 22 06:33:38 2008
@@ -32,10 +32,10 @@
 class GCPointsBaseLiveRangeFixer: public SessionAction {
 public:
     void runImpl();
-    uint32 getSideEffects() const {return sideEffect;}
-    uint32 getNeedInfo()const{ return 0;}
+    U_32 getSideEffects() const {return sideEffect;}
+    U_32 getNeedInfo()const{ return 0;}
 private:
-    uint32 sideEffect;    
+    U_32 sideEffect;    
 };
 
 class GCSafePointsInfo;
@@ -90,7 +90,7 @@
 };
 
 typedef StlVector<MPtrPair> GCSafePointPairs;
-typedef StlMap<uint32, GCSafePointPairs*> GCSafePointPairsMap;
+typedef StlMap<U_32, GCSafePointPairs*> GCSafePointPairsMap;
 
 class GCSafePointsInfo {
 
@@ -116,7 +116,7 @@
     static bool graphHasSafePoints(const IRManager& irm);
     static bool blockHasSafePoints(const Node* b);
     /** if pairs!=NULL counts only gcpoints with non-empty pairs*/
-    static uint32 getNumSafePointsInBlock(const Node* b, const GCSafePointPairsMap* pairsMap = NULL);
+    static U_32 getNumSafePointsInBlock(const Node* b, const GCSafePointPairsMap* pairsMap = NULL);
     static MPtrPair* findPairByMPtrOpnd(GCSafePointPairs& pairs, const Opnd* mptr);
    static bool isManaged(Opnd* op) { return op->getType()->isObject() || op->getType()->isManagedPtr();}
 
@@ -151,9 +151,9 @@
     void removePairByMPtrOpnd(GCSafePointPairs& pairs, const Opnd* mptr) const;
     void runLivenessFilter(Inst* inst, GCSafePointPairs& res) const;
     Opnd* getBaseAccordingMode(Opnd* opnd) const;
-    void  updateMptrInfoInPairs(GCSafePointPairs& res, Opnd* newMptr, Opnd* fromOpnd, int32 offset, bool fromOpndIsBase);
+    void  updateMptrInfoInPairs(GCSafePointPairs& res, Opnd* newMptr, Opnd* fromOpnd, I_32 offset, bool fromOpndIsBase);
     //returns offset if offsetOpnd is immediate ir MPTR_OFFSET_UNKNOWN if not */
-    int32 getOffsetFromImmediate(Opnd* offsetOpnd) const;
+    I_32 getOffsetFromImmediate(Opnd* offsetOpnd) const;
 
     MemoryManager&  mm;
     IRManager&      irm;
@@ -167,8 +167,8 @@
     bool allowMerging;
 
     /** stat fields */
-    uint32 opndsAdded; 
-    uint32 instsAdded;
+    U_32 opndsAdded; 
+    U_32 instsAdded;
     Mode   mode;
 
 };

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32I8Lowerer.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32I8Lowerer.cpp?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32I8Lowerer.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32I8Lowerer.cpp Thu May 22 06:33:38 2008
@@ -49,11 +49,11 @@
     //
     // virtuals
     //
-    uint32 getNeedInfo(void) const
+    U_32 getNeedInfo(void) const
     {
         return NeedInfo_LoopInfo;
     }
-    uint32 getSideEffects(void) const
+    U_32 getSideEffects(void) const
     {
         // Simplest presumption - if we found at least one I8PseudoInst
         // we might affect everything, including liveness, loop info 
@@ -114,7 +114,7 @@
     void propagateDivRemResults(Inst* originalInst, Node* originalInstNode, 
         Opnd* quot_lo, Opnd* quot_hi, Opnd* rem_lo, Opnd* rem_hi);
 
-    uint32 foundI8Opnds;
+    U_32 foundI8Opnds;
 private:
     /**
      * Tests whether the type is subject for lowering.
@@ -184,7 +184,7 @@
 "inline_mul64=true/false\n"
 "   default=true. Inlines multiplication of 64 bits longs, instead of generating call to helper.\n"
 "inline_mul64_checks=true/false\n"
-"   default=false. Adds additional checks whether multipliers are indeed int32 for simpler operation.\n"
+"   default=false. Adds additional checks whether multipliers are indeed I_32 for simpler operation.\n"
 "inline_div64=true/false\n"
 "   default=true. Inlines division of 64 bits longs, instead of generating call to helper.\n"
 "inline_rem64=true/false\n"
@@ -288,7 +288,7 @@
         Inst *  cdq = NULL;
         for (Inst* inst = (Inst*)node->getFirstInst(),*nextInst=NULL; inst!=NULL; inst = nextInst) {
             nextInst = inst->getNextInst();
-            uint32  defCount = inst->getOpndCount(Inst::OpndRole_InstLevel|Inst::OpndRole_Def);
+            U_32  defCount = inst->getOpndCount(Inst::OpndRole_InstLevel|Inst::OpndRole_Def);
             if(inst->getMnemonic() == Mnemonic_CDQ) {
                 if (inst->getNextInst()!=NULL && inst->getNextInst()->getMnemonic() == Mnemonic_IDIV) {
                     continue;
@@ -326,13 +326,13 @@
         mn==Mnemonic_RET ||
         inst->hasKind(Inst::Kind_EntryPointPseudoInst) || 
         inst->hasKind(Inst::Kind_AliasPseudoInst)) {
-        for(uint32 i = 0; i < inst->getOpndCount(); i++) {
+        for(U_32 i = 0; i < inst->getOpndCount(); i++) {
             Opnd * opnd = inst->getOpnd(i);
             if (!isI8Type(opnd->getType())) {
                 continue;
             }
-            foundI8Opnds = ~(uint32)0;
-            uint32 roles = inst->getOpndRoles(i);
+            foundI8Opnds = ~(U_32)0;
+            U_32 roles = inst->getOpndRoles(i);
             if (inst->hasKind(Inst::Kind_AliasPseudoInst)) {
                 if (roles & Inst::OpndRole_Use) {
                     prepareNewOpnds(opnd,newOp1,newOp2);
@@ -349,7 +349,7 @@
             }
         }
     } else if (inst->hasKind(Inst::Kind_I8PseudoInst)){
-        uint32  defCount = inst->getOpndCount(Inst::OpndRole_InstLevel|Inst::OpndRole_Def),
+        U_32  defCount = inst->getOpndCount(Inst::OpndRole_InstLevel|Inst::OpndRole_Def),
                 useCount = inst->getOpndCount(Inst::OpndRole_InstLevel|Inst::OpndRole_Use);
         Opnd * dst = defCount > 0 ? inst->getOpnd(0) : NULL;
         Opnd * src1 = useCount> 0 ? inst->getOpnd(defCount): NULL;
@@ -862,8 +862,8 @@
             Opnd * opnds[2] = { newOp1, newOp2 };
             irManager->assignInnerMemOpnds(longOpnd, opnds, 2);
         } else if(longOpnd->isPlacedIn(OpndKind_Imm)){
-            newOp1 = irManager->newImmOpnd(irManager->getTypeManager().getUInt32Type(), (uint32)longOpnd->getImmValue());
-            newOp2 = irManager->newImmOpnd(irManager->getTypeManager().getInt32Type(), (int32)(longOpnd->getImmValue()>>32));
+            newOp1 = irManager->newImmOpnd(irManager->getTypeManager().getUInt32Type(), (U_32)longOpnd->getImmValue());
+            newOp2 = irManager->newImmOpnd(irManager->getTypeManager().getInt32Type(), (I_32)(longOpnd->getImmValue()>>32));
         } else {
             newOp1 = irManager->newOpnd(irManager->getTypeManager().getUInt32Type());
             newOp2 = irManager->newOpnd(irManager->getTypeManager().getInt32Type());

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRConstants.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRConstants.cpp?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRConstants.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRConstants.cpp Thu May 22 06:33:38 2008
@@ -94,10 +94,10 @@
 }
 
 //_________________________________________________________________________________________________
-uint32 countOnes(uint32 mask)
+U_32 countOnes(U_32 mask)
 {
-    uint32 count=0;
-    for (uint32 m=1; m; m<<=1) if ((mask & m)!=0) count++;
+    U_32 count=0;
+    for (U_32 m=1; m; m<<=1) if ((mask & m)!=0) count++;
     return count;
 }
 

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRConstants.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRConstants.h?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRConstants.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRConstants.h Thu May 22 06:33:38 2008
@@ -39,22 +39,22 @@
 #undef  offsetof
 #define offsetof(cls, field)  ((POINTER_SIZE_INT)&(((cls*)4)->field)-4)
 
-const uint32 EmptyUint32=((uint32)-1);
-const uint32 UnknownId=EmptyUint32;
+const U_32 EmptyUint32=((U_32)-1);
+const U_32 UnknownId=EmptyUint32;
 
-const uint32 IRMaxExtendedOpnds=8;
-const uint32 IRMaxNativeOpnds=4;
-const uint32 IRMaxInstOpnds=512;
+const U_32 IRMaxExtendedOpnds=8;
+const U_32 IRMaxNativeOpnds=4;
+const U_32 IRMaxInstOpnds=512;
 
-const uint32 IRMaxOperandByteSize = 16;
+const U_32 IRMaxOperandByteSize = 16;
 
 
 //=========================================================================================================
-const uint32 IRNumRegKinds=5;
+const U_32 IRNumRegKinds=5;
 
-const uint32 IRMaxRegKinds=OpndKind_Reg + 1;
-const uint32 IRMaxRegNamesSameKind=16;
-const uint32 IRMaxRegNames=IRMaxRegNamesSameKind*IRMaxRegKinds;
+const U_32 IRMaxRegKinds=OpndKind_Reg + 1;
+const U_32 IRMaxRegNamesSameKind=16;
+const U_32 IRMaxRegNames=IRMaxRegNamesSameKind*IRMaxRegKinds;
 //=========================================================================================================
 enum MemOpndKind
 {
@@ -75,11 +75,11 @@
     MemOpndSubOpndKind_Displacement,
     MemOpndSubOpndKind_Count
 };
-uint32              countOnes(uint32 mask);
+U_32              countOnes(U_32 mask);
 
 //=========================================================================================================
 
-inline uint32       getByteSize(OpndSize size)
+inline U_32       getByteSize(OpndSize size)
 { return size <= OpndSize_64 ? size : size == OpndSize_128 ? 16 : size==OpndSize_80 ? 10 : 0; }
 
 ConditionMnemonic   reverseConditionMnemonic(ConditionMnemonic cm);

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRManager.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRManager.cpp?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRManager.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRManager.cpp Thu May 22 06:33:38 2008
@@ -46,11 +46,11 @@
 }
 
 //_________________________________________________________________________________________________
-const char * newString(MemoryManager& mm, const char * str, uint32 length)
+const char * newString(MemoryManager& mm, const char * str, U_32 length)
 {
     assert(str!=NULL);
     if (length==EmptyUint32)
-        length=(uint32)strlen(str);
+        length=(U_32)strlen(str);
     char * psz=new(mm) char[length+1];
     strncpy(psz, str, length);
     psz[length]=0;
@@ -68,7 +68,7 @@
         refsCompressed(VMInterface::areReferencesCompressed())
 
 {  
-    for (uint32 i=0; i<lengthof(regOpnds); i++) regOpnds[i]=NULL;
+    for (U_32 i=0; i<lengthof(regOpnds); i++) regOpnds[i]=NULL;
     fg = new (memManager) ControlFlowGraph(memManager, this);
     fg->setEntryNode(fg->createBlockNode());
     fg->setLoopTree(new (memManager) LoopTree(memManager, fg));
@@ -82,7 +82,7 @@
 { 
     assert(opnd->id>=opnds.size());
     opnds.push_back(opnd);
-    opnd->id=(uint32)opnds.size()-1;
+    opnd->id=(U_32)opnds.size()-1;
 }
 
 //_____________________________________________________________________________________________
@@ -138,7 +138,7 @@
 }
 
 //_____________________________________________________________________________________________
-ConstantAreaItem *  IRManager::newSwitchTableConstantAreaItem(uint32 numTargets)
+ConstantAreaItem *  IRManager::newSwitchTableConstantAreaItem(U_32 numTargets)
 {
     return new(memoryManager) ConstantAreaItem(
         ConstantAreaItem::Kind_SwitchTableConstantAreaItem, sizeof(BasicBlock*)*numTargets, 
@@ -152,13 +152,13 @@
     if (str==NULL)
         str="";
     return new(memoryManager) ConstantAreaItem(
-        ConstantAreaItem::Kind_InternalStringConstantAreaItem, (uint32)strlen(str)+1, 
+        ConstantAreaItem::Kind_InternalStringConstantAreaItem, (U_32)strlen(str)+1, 
         (void*)newInternalString(str)
     );
 }
 
 //_____________________________________________________________________________________________
-ConstantAreaItem * IRManager::newBinaryConstantAreaItem(uint32 size, const void * pv)
+ConstantAreaItem * IRManager::newBinaryConstantAreaItem(U_32 size, const void * pv)
 {
     return new(memoryManager) ConstantAreaItem(ConstantAreaItem::Kind_BinaryConstantAreaItem, size, pv);
 }
@@ -197,14 +197,14 @@
 }
 
 //_____________________________________________________________________________________________
-Opnd * IRManager::newBinaryConstantImmOpnd(uint32 size, const void * pv)
+Opnd * IRManager::newBinaryConstantImmOpnd(U_32 size, const void * pv)
 {
     ConstantAreaItem * item=newBinaryConstantAreaItem(size, pv);
     return newImmOpnd(typeManager.getUnmanagedPtrType(typeManager.getIntPtrType()), Opnd::RuntimeInfo::Kind_ConstantAreaItem, item);
 }
 
 //_____________________________________________________________________________________________
-SwitchInst * IRManager::newSwitchInst(uint32 numTargets, Opnd * index)
+SwitchInst * IRManager::newSwitchInst(U_32 numTargets, Opnd * index)
 {
     assert(numTargets>0);
     assert(index!=NULL);
@@ -256,7 +256,7 @@
 }
 
 //_____________________________________________________________________________________________
-Opnd * IRManager::newMemOpnd(Type * type, MemOpndKind k, Opnd * base, int32 displacement, RegName segReg)
+Opnd * IRManager::newMemOpnd(Type * type, MemOpndKind k, Opnd * base, I_32 displacement, RegName segReg)
 {
     return newMemOpnd(type, k, base, 0, 0, newImmOpnd(typeManager.getInt32Type(), displacement), segReg);
 }
@@ -290,7 +290,7 @@
 //_____________________________________________________________________________________________
 void IRManager::initInitialConstraints()
 {
-    for (uint32 i=0; i<lengthof(initialConstraints); i++)
+    for (U_32 i=0; i<lengthof(initialConstraints); i++)
         initialConstraints[i] = createInitialConstraint((Type::Tag)i);
 }
 
@@ -311,9 +311,9 @@
 Inst * IRManager::newInst(Mnemonic mnemonic, Opnd * opnd0, Opnd * opnd1, Opnd * opnd2)
 {
     Inst * inst = new(memoryManager, 4) Inst(mnemonic, instId++, Inst::Form_Native);
-    uint32 i=0;
+    U_32 i=0;
     Opnd ** opnds = inst->getOpnds();
-    uint32 * roles = inst->getOpndRoles();
+    U_32 * roles = inst->getOpndRoles();
     if (opnd0!=NULL){ opnds[i] = opnd0; roles[i] = Inst::OpndRole_Explicit; i++;
     if (opnd1!=NULL){ opnds[i] = opnd1; roles[i] = Inst::OpndRole_Explicit; i++;
     if (opnd2!=NULL){ opnds[i] = opnd2; roles[i] = Inst::OpndRole_Explicit; i++;
@@ -330,9 +330,9 @@
     )
 {
     Inst * inst = new(memoryManager, 8) Inst(mnemonic, instId++, Inst::Form_Native);
-    uint32 i=0;
+    U_32 i=0;
     Opnd ** opnds = inst->getOpnds();
-    uint32 * roles = inst->getOpndRoles();
+    U_32 * roles = inst->getOpndRoles();
     if (opnd0!=NULL){ opnds[i] = opnd0; roles[i] = Inst::OpndRole_Explicit; i++;
     if (opnd1!=NULL){ opnds[i] = opnd1; roles[i] = Inst::OpndRole_Explicit; i++;
     if (opnd2!=NULL){ opnds[i] = opnd2; roles[i] = Inst::OpndRole_Explicit; i++;
@@ -348,12 +348,12 @@
 }
 
 //_____________________________________________________________________________________________
-Inst * IRManager::newInstEx(Mnemonic mnemonic, uint32 defCount, Opnd * opnd0, Opnd * opnd1, Opnd * opnd2)
+Inst * IRManager::newInstEx(Mnemonic mnemonic, U_32 defCount, Opnd * opnd0, Opnd * opnd1, Opnd * opnd2)
 {
     Inst * inst = new(memoryManager, 4) Inst(mnemonic, instId++, Inst::Form_Extended);
-    uint32 i=0;
+    U_32 i=0;
     Opnd ** opnds = inst->getOpnds();
-    uint32 * roles = inst->getOpndRoles();
+    U_32 * roles = inst->getOpndRoles();
     if (opnd0!=NULL){ 
         opnds[i] = opnd0; roles[i] = Inst::OpndRole_Explicit; i++;
     if (opnd1!=NULL){ 
@@ -368,15 +368,15 @@
 }
 
 //_____________________________________________________________________________________________
-Inst * IRManager::newInstEx(Mnemonic mnemonic, uint32 defCount, 
+Inst * IRManager::newInstEx(Mnemonic mnemonic, U_32 defCount, 
         Opnd * opnd0, Opnd * opnd1, Opnd * opnd2, Opnd * opnd3, 
         Opnd * opnd4, Opnd * opnd5, Opnd * opnd6, Opnd * opnd7
     )
 {
     Inst * inst = new(memoryManager, 8) Inst(mnemonic, instId++, Inst::Form_Extended);
-    uint32 i=0;
+    U_32 i=0;
     Opnd ** opnds = inst->getOpnds();
-    uint32 * roles = inst->getOpndRoles();
+    U_32 * roles = inst->getOpndRoles();
     if (opnd0!=NULL){ 
         opnds[i] = opnd0; roles[i] = Inst::OpndRole_Explicit; i++;
     if (opnd1!=NULL){ 
@@ -401,13 +401,13 @@
 }
 
 //_________________________________________________________________________________________________
-Inst * IRManager::newI8PseudoInst(Mnemonic mnemonic, uint32 defCount,
+Inst * IRManager::newI8PseudoInst(Mnemonic mnemonic, U_32 defCount,
             Opnd * opnd0, Opnd * opnd1, Opnd * opnd2, Opnd * opnd3
         )
 {
     Inst * inst=new  (memoryManager, 4) Inst(mnemonic, instId++, Inst::Form_Extended);
     inst->kind = Inst::Kind_I8PseudoInst;
-    uint32 i=0;
+    U_32 i=0;
     Opnd ** opnds = inst->getOpnds();
     assert(opnd0->getType()->isInteger() ||opnd0->getType()->isPtr());
     if (opnd0!=NULL){       opnds[i] = opnd0; i++;
@@ -425,7 +425,7 @@
 SystemExceptionCheckPseudoInst * IRManager::newSystemExceptionCheckPseudoInst(CompilationInterface::SystemExceptionId exceptionId, Opnd * opnd0, Opnd * opnd1, bool checksThisForInlinedMethod)
 {
     SystemExceptionCheckPseudoInst * inst=new  (memoryManager, 8) SystemExceptionCheckPseudoInst(exceptionId, instId++, checksThisForInlinedMethod);
-    uint32 i=0;
+    U_32 i=0;
     Opnd ** opnds = inst->getOpnds();
     if (opnd0!=NULL){ opnds[i++] = opnd0; 
     if (opnd1!=NULL){ opnds[i++] = opnd1;
@@ -490,11 +490,11 @@
 
 //_________________________________________________________________________________________________
 CallInst * IRManager::newCallInst(Opnd * targetOpnd, const CallingConvention * cc, 
-        uint32 argCount, Opnd ** args, Opnd * retOpnd)
+        U_32 argCount, Opnd ** args, Opnd * retOpnd)
 {
     CallInst * callInst=new(memoryManager, (argCount + (retOpnd ? 1 : 0)) * 2 + 1) CallInst(this, instId++, cc, targetOpnd->getRuntimeInfo());
     CallingConventionClient & ccc = callInst->callingConventionClient;
-    uint32 i=0;
+    U_32 i=0;
     if (retOpnd!=NULL){
         ccc.pushInfo(Inst::OpndRole_Def, retOpnd->getType()->tag);
         callInst->insertOpnd(i++, retOpnd, Inst::OpndRole_Auxilary|Inst::OpndRole_Def);
@@ -503,7 +503,7 @@
     callInst->insertOpnd(i++, targetOpnd, Inst::OpndRole_Explicit|Inst::OpndRole_Use);
 
     if (argCount>0){
-        for (uint32 j=0; j<argCount; j++){
+        for (U_32 j=0; j<argCount; j++){
             ccc.pushInfo(Inst::OpndRole_Use, args[j]->getType()->tag);
             callInst->insertOpnd(i++, args[j], Inst::OpndRole_Auxilary|Inst::OpndRole_Use);
         }
@@ -515,7 +515,7 @@
 
 //_________________________________________________________________________________________________
 CallInst * IRManager::newRuntimeHelperCallInst(VM_RT_SUPPORT helperId, 
-    uint32 numArgs, Opnd ** args, Opnd * retOpnd)
+    U_32 numArgs, Opnd ** args, Opnd * retOpnd)
 {
     Inst * instList = NULL;
     Opnd * target=newImmOpnd(typeManager.getInt32Type(), Opnd::RuntimeInfo::Kind_HelperAddress, (void*)helperId);
@@ -525,7 +525,7 @@
 }
 
 //_________________________________________________________________________________________________
-CallInst * IRManager::newInternalRuntimeHelperCallInst(const char * internalHelperID, uint32 numArgs, Opnd ** args, Opnd * retOpnd)
+CallInst * IRManager::newInternalRuntimeHelperCallInst(const char * internalHelperID, U_32 numArgs, Opnd ** args, Opnd * retOpnd)
 {
     const InternalHelperInfo * info=getInternalHelperInfo(internalHelperID);
     assert(info!=NULL);
@@ -598,7 +598,7 @@
                     retInst->callingConventionClient.layoutAuxilaryOpnds(Inst::OpndRole_Use, OpndKind_Null);
 
                     if (retInst->getCallingConventionClient().getCallingConvention()->calleeRestoresStack()){
-                        uint32 stackDepth=getEntryPointInst()->getArgStackDepth();
+                        U_32 stackDepth=getEntryPointInst()->getArgStackDepth();
                         retInst->getOpnd(0)->assignImmValue(stackDepth);
                     }
                 }
@@ -627,15 +627,15 @@
         assert(opnd->getType()->isObject() || opnd->getType()->isManagedPtr());
     }
 #endif
-    GCInfoPseudoInst* inst = new(memoryManager, (uint32)basesAndMptrs.size()) GCInfoPseudoInst(this, instId++);
+    GCInfoPseudoInst* inst = new(memoryManager, (U_32)basesAndMptrs.size()) GCInfoPseudoInst(this, instId++);
     Opnd ** opnds = inst->getOpnds();
     Constraint * constraints = inst->getConstraints();
-    for (uint32 i = 0, n = (uint32)basesAndMptrs.size(); i < n; i++){
+    for (U_32 i = 0, n = (U_32)basesAndMptrs.size(); i < n; i++){
         Opnd * opnd = basesAndMptrs[i];
         opnds[i] = opnd;
         constraints[i] = Constraint(OpndKind_Any, opnd->getSize());
     }
-    inst->opndCount = (uint32)basesAndMptrs.size();
+    inst->opndCount = (U_32)basesAndMptrs.size();
     inst->assignOpcodeGroup(this);
     return inst;
 }
@@ -678,7 +678,7 @@
 Inst * IRManager::newCopyPseudoInst(Mnemonic mn, Opnd * opnd0, Opnd * opnd1)
 { 
     assert(mn==Mnemonic_MOV||mn==Mnemonic_PUSH||mn==Mnemonic_POP);
-    uint32 allOpndCnt = opnd0->getType()->isInt8() ? 4 : 2;
+    U_32 allOpndCnt = opnd0->getType()->isInt8() ? 4 : 2;
     Inst * inst=new  (memoryManager, allOpndCnt) Inst(mn, instId++, Inst::Form_Extended);
     inst->kind = Inst::Kind_CopyPseudoInst;
     assert(opnd0!=NULL);
@@ -702,7 +702,7 @@
 }
 
 //_________________________________________________________________________________________________
-AliasPseudoInst * IRManager::newAliasPseudoInst(Opnd * targetOpnd, Opnd * sourceOpnd, uint32 offset)
+AliasPseudoInst * IRManager::newAliasPseudoInst(Opnd * targetOpnd, Opnd * sourceOpnd, U_32 offset)
 {
     assert(sourceOpnd->isPlacedIn(OpndKind_Memory));
     assert(!targetOpnd->hasAssignedPhysicalLocation());
@@ -715,13 +715,13 @@
     OpndSize targetSize=getTypeSize(targetType);
 
 #ifdef _DEBUG
-    uint32 sourceByteSize=getByteSize(sourceSize);
-    uint32 targetByteSize=getByteSize(targetSize);
+    U_32 sourceByteSize=getByteSize(sourceSize);
+    U_32 targetByteSize=getByteSize(targetSize);
     assert(getByteSize(sourceSize)>0 && getByteSize(targetSize)>0);
     assert(offset+targetByteSize<=sourceByteSize);
 #endif
 
-    uint32 allocOpndNum = sourceOpnd->getType()->isInt8() ? 3 : 2;
+    U_32 allocOpndNum = sourceOpnd->getType()->isInt8() ? 3 : 2;
     AliasPseudoInst * inst=new  (memoryManager, allocOpndNum) AliasPseudoInst(instId++);
 
     inst->getOpnds()[0] = targetOpnd;
@@ -745,15 +745,15 @@
 }
 
 //_________________________________________________________________________________________________
-AliasPseudoInst * IRManager::newAliasPseudoInst(Opnd * targetOpnd, uint32 sourceOpndCount, Opnd ** sourceOpnds)
+AliasPseudoInst * IRManager::newAliasPseudoInst(Opnd * targetOpnd, U_32 sourceOpndCount, Opnd ** sourceOpnds)
 {
     assert(targetOpnd->isPlacedIn(OpndKind_Memory));
 
     Type * targetType=targetOpnd->getType();
     OpndSize targetSize=getTypeSize(targetType);
     assert(getByteSize(targetSize)>0);
-    uint32 allocOpnNum = 0;
-    for (uint32 i=0; i<sourceOpndCount; i++) allocOpnNum += getByteSize(getTypeSize(sourceOpnds[i]->getType()));
+    U_32 allocOpnNum = 0;
+    for (U_32 i=0; i<sourceOpndCount; i++) allocOpnNum += getByteSize(getTypeSize(sourceOpnds[i]->getType()));
 
     allocOpnNum += getByteSize(getTypeSize(targetOpnd->getType()));
     AliasPseudoInst * inst=new  (memoryManager, allocOpnNum) AliasPseudoInst(instId++);
@@ -765,8 +765,8 @@
     opndConstraints[0] = Constraint(OpndKind_Mem, targetSize);
 
 
-    uint32 offset=0;
-    for (uint32 i=0; i<sourceOpndCount; i++){
+    U_32 offset=0;
+    for (U_32 i=0; i<sourceOpndCount; i++){
         assert(!sourceOpnds[i]->hasAssignedPhysicalLocation() || 
             (sourceOpnds[i]->isPlacedIn(OpndKind_Memory) && 
             sourceOpnds[i]->getMemOpndKind() == targetOpnd->getMemOpndKind())
@@ -774,7 +774,7 @@
         assert(sourceOpnds[i]->canBePlacedIn(OpndKind_Memory));
         Type * sourceType=sourceOpnds[i]->getType();
         OpndSize sourceSize=getTypeSize(sourceType);
-        uint32 sourceByteSize=getByteSize(sourceSize);
+        U_32 sourceByteSize=getByteSize(sourceSize);
         assert(sourceByteSize>0);
         assert(offset+sourceByteSize<=getByteSize(targetSize));
 
@@ -798,11 +798,11 @@
     Opnd * const * opnds = inst->getOpnds();
     Opnd * defOpnd=opnds[0];
     Opnd * const * useOpnds = opnds + 1; 
-    uint32 useCount = inst->getOpndCount(Inst::OpndRole_InstLevel|Inst::OpndRole_Use);
+    U_32 useCount = inst->getOpndCount(Inst::OpndRole_InstLevel|Inst::OpndRole_Use);
     assert(useCount > 0);
     if (inst->offset==EmptyUint32){
-        uint32 offset=0;
-        for (uint32 i=0; i<useCount; i++){
+        U_32 offset=0;
+        for (U_32 i=0; i<useCount; i++){
             Opnd * innerOpnd=useOpnds[i];
             assignInnerMemOpnd(defOpnd, innerOpnd, offset);
             offset+=getByteSize(innerOpnd->getSize());
@@ -812,7 +812,7 @@
 }
 
 //_________________________________________________________________________________________________
-void IRManager::addAliasRelation(AliasRelation * relations, Opnd * outerOpnd, Opnd * innerOpnd, uint32 offset)
+void IRManager::addAliasRelation(AliasRelation * relations, Opnd * outerOpnd, Opnd * innerOpnd, U_32 offset)
 {
     if (outerOpnd==innerOpnd){
         assert(offset==0);
@@ -833,12 +833,12 @@
 #ifdef _DEBUG
     Type * outerType=outerOpnd->getType();
     OpndSize outerSize=getTypeSize(outerType);
-    uint32 outerByteSize=getByteSize(outerSize);
+    U_32 outerByteSize=getByteSize(outerSize);
     assert(offset<outerByteSize);
 
     Type * innerType=innerOpnd->getType();
     OpndSize innerSize=getTypeSize(innerType);
-    uint32 innerByteSize=getByteSize(innerSize);
+    U_32 innerByteSize=getByteSize(innerSize);
     assert(outerByteSize>0 && innerByteSize>0);
     assert(offset+innerByteSize<=outerByteSize);
 #endif
@@ -859,13 +859,13 @@
                 if (inst->hasKind(Inst::Kind_AliasPseudoInst)){
                     AliasPseudoInst * aliasInst=(AliasPseudoInst *)inst;
                     Opnd * const * opnds = inst->getOpnds();
-                    uint32 useCount = inst->getOpndCount(Inst::OpndRole_InstLevel|Inst::OpndRole_Use);
+                    U_32 useCount = inst->getOpndCount(Inst::OpndRole_InstLevel|Inst::OpndRole_Use);
                     assert(inst->getOpndCount(Inst::OpndRole_InstLevel|Inst::OpndRole_Def) == 1 && useCount > 0);
                     Opnd * defOpnd=opnds[0];
                     Opnd * const * useOpnds = opnds + 1; 
                     if (aliasInst->offset==EmptyUint32){
-                        uint32 offset=0;
-                        for (uint32 i=0; i<useCount; i++){
+                        U_32 offset=0;
+                        for (U_32 i=0; i<useCount; i++){
                             Opnd * innerOpnd=useOpnds[i];
                             addAliasRelation(relations, defOpnd, innerOpnd, offset);
                             offset+=getByteSize(innerOpnd->getSize());
@@ -883,10 +883,10 @@
 void IRManager::layoutAliasOpnds() 
 {
     MemoryManager mm("layoutAliasOpnds");
-    uint32 opndCount=getOpndCount();
+    U_32 opndCount=getOpndCount();
     AliasRelation * relations=new  (memoryManager) AliasRelation[opndCount];
     getAliasRelations(relations);
-    for (uint32 i=0; i<opndCount; i++){
+    for (U_32 i=0; i<opndCount; i++){
         if (relations[i].outerOpnd!=NULL){
             Opnd * innerOpnd=getOpnd(i);
             assert(innerOpnd->isPlacedIn(OpndKind_Mem));
@@ -897,14 +897,14 @@
                 innerOpnd->setMemOpndSubOpnd(MemOpndSubOpndKind_Displacement, innerDispOpnd);
             }
             Opnd * outerDispOpnd=relations[i].outerOpnd->getMemOpndSubOpnd(MemOpndSubOpndKind_Displacement);
-            uint32 outerDispValue=(uint32)(outerDispOpnd!=NULL?outerDispOpnd->getImmValue():0);
+            U_32 outerDispValue=(U_32)(outerDispOpnd!=NULL?outerDispOpnd->getImmValue():0);
             innerDispOpnd->assignImmValue(outerDispValue+relations[i].offset);
         }
     }
 }
 
 //_________________________________________________________________________________________________
-uint32 IRManager::assignInnerMemOpnd(Opnd * outerOpnd, Opnd* innerOpnd, uint32 offset)
+U_32 IRManager::assignInnerMemOpnd(Opnd * outerOpnd, Opnd* innerOpnd, U_32 offset)
 {
     assert(outerOpnd->isPlacedIn(OpndKind_Memory));
 
@@ -918,7 +918,7 @@
     Opnd * outerScale=outerOpnd->getMemOpndSubOpnd(MemOpndSubOpndKind_Scale);
 
     OpndSize innerSize = innerOpnd->getSize();
-    uint32 innerByteSize = getByteSize(innerSize);
+    U_32 innerByteSize = getByteSize(innerSize);
         
     Opnd * innerDisp=newImmOpnd(outerDisp!=NULL?outerDisp->getType():typeManager.getInt32Type(), outerDispValue+offset);
     if (outerDispRI){
@@ -938,19 +938,19 @@
 }
 
 //_________________________________________________________________________________________________
-void IRManager::assignInnerMemOpnds(Opnd * outerOpnd, Opnd** innerOpnds, uint32 innerOpndCount)
+void IRManager::assignInnerMemOpnds(Opnd * outerOpnd, Opnd** innerOpnds, U_32 innerOpndCount)
 {
 #ifdef _DEBUG
-    uint32 outerByteSize = getByteSize(outerOpnd->getSize());
+    U_32 outerByteSize = getByteSize(outerOpnd->getSize());
 #endif
-    for (uint32 i=0, offset=0; i<innerOpndCount; i++){
+    for (U_32 i=0, offset=0; i<innerOpndCount; i++){
         offset+=assignInnerMemOpnd(outerOpnd, innerOpnds[i], offset);
         assert(offset<=outerByteSize);
     }
 }
 
 //_________________________________________________________________________________________________
-uint32 getLayoutOpndAlignment(Opnd * opnd)
+U_32 getLayoutOpndAlignment(Opnd * opnd)
 {
     OpndSize size=opnd->getSize();
     if (size==OpndSize_80 || size==OpndSize_128)
@@ -964,7 +964,7 @@
 
 //_________________________________________________________________________________________________
 
-Inst * IRManager::newCopySequence(Mnemonic mn, Opnd * opnd0, Opnd * opnd1, uint32 gpRegUsageMask, uint32 flagsRegUsageMask)
+Inst * IRManager::newCopySequence(Mnemonic mn, Opnd * opnd0, Opnd * opnd1, U_32 gpRegUsageMask, U_32 flagsRegUsageMask)
 {
     if (mn==Mnemonic_MOV)
         return newCopySequence(opnd0, opnd1, gpRegUsageMask, flagsRegUsageMask);
@@ -978,16 +978,16 @@
 
 //_________________________________________________________________________________________________
 
-Inst * IRManager::newMemMovSequence(Opnd * targetOpnd, Opnd * sourceOpnd, uint32 regUsageMask, bool checkSource)
+Inst * IRManager::newMemMovSequence(Opnd * targetOpnd, Opnd * sourceOpnd, U_32 regUsageMask, bool checkSource)
 {
     Inst * instList=NULL;
     RegName tmpRegName=RegName_Null, unusedTmpRegName=RegName_Null;
     bool registerSetNotLocked = !isRegisterSetLocked(OpndKind_GPReg);
 
 #ifdef _EM64T_
-    for (uint32 reg = RegName_RAX; reg<=RegName_R15/*(uint32)(targetOpnd->getSize()<OpndSize_64?RegName_RBX:RegName_RDI)*/; reg++) {
+    for (U_32 reg = RegName_RAX; reg<=RegName_R15/*(U_32)(targetOpnd->getSize()<OpndSize_64?RegName_RBX:RegName_RDI)*/; reg++) {
 #else
-    for (uint32 reg = RegName_EAX; reg<=(uint32)(targetOpnd->getSize()<OpndSize_32?RegName_EBX:RegName_EDI); reg++) {
+    for (U_32 reg = RegName_EAX; reg<=(U_32)(targetOpnd->getSize()<OpndSize_32?RegName_EBX:RegName_EDI); reg++) {
 #endif
         RegName regName = (RegName) reg;
         if (regName == STACK_REG)
@@ -1037,7 +1037,7 @@
 
 //_________________________________________________________________________________________________
 
-Inst * IRManager::newCopySequence(Opnd * targetBOpnd, Opnd * sourceBOpnd, uint32 regUsageMask, uint32 flagsRegUsageMask)
+Inst * IRManager::newCopySequence(Opnd * targetBOpnd, Opnd * sourceBOpnd, U_32 regUsageMask, U_32 flagsRegUsageMask)
 
 { 
     Opnd * targetOpnd=(Opnd*)targetBOpnd, * sourceOpnd=(Opnd*)sourceBOpnd;
@@ -1050,7 +1050,7 @@
     }
 
     OpndSize sourceSize=sourceConstraint.getSize();
-    uint32 sourceByteSize=getByteSize(sourceSize);
+    U_32 sourceByteSize=getByteSize(sourceSize);
     OpndKind targetKind=(OpndKind)targetConstraint.getKind();
     OpndKind sourceKind=(OpndKind)sourceConstraint.getKind();
 
@@ -1111,17 +1111,17 @@
         if (sourceKind==OpndKind_Mem && targetKind==OpndKind_Mem){
             Inst * instList=NULL;
 #ifndef _EM64T_
-            uint32 targetByteSize=getByteSize(targetSize);
+            U_32 targetByteSize=getByteSize(targetSize);
             if (sourceByteSize<=4){
                 instList=newMemMovSequence(targetOpnd, sourceOpnd, regUsageMask);
             }else{
                 Opnd * targetOpnds[IRMaxOperandByteSize/4]; // limitation because we are currently don't support large memory operands
-                uint32 targetOpndCount = 0;
-                for (uint32 cb=0; cb<sourceByteSize && cb<targetByteSize; cb+=4)
+                U_32 targetOpndCount = 0;
+                for (U_32 cb=0; cb<sourceByteSize && cb<targetByteSize; cb+=4)
                     targetOpnds[targetOpndCount++] = newOpnd(typeManager.getInt32Type());
                 AliasPseudoInst * targetAliasInst=newAliasPseudoInst(targetOpnd, targetOpndCount, targetOpnds);
                 layoutAliasPseudoInstOpnds(targetAliasInst);
-                for (uint32 cb=0, targetOpndSlotIndex=0; cb<sourceByteSize && cb<targetByteSize; cb+=4, targetOpndSlotIndex++){  
+                for (U_32 cb=0, targetOpndSlotIndex=0; cb<sourceByteSize && cb<targetByteSize; cb+=4, targetOpndSlotIndex++){  
                     Opnd * sourceOpndSlot=newOpnd(typeManager.getInt32Type());
                     appendToInstList(instList, newAliasPseudoInst(sourceOpndSlot, sourceOpnd, cb));
                     Opnd * targetOpndSlot=targetOpnds[targetOpndSlotIndex];
@@ -1193,7 +1193,7 @@
 
 //_________________________________________________________________________________________________
 
-Inst * IRManager::newPushPopSequence(Mnemonic mn, Opnd * opnd, uint32 regUsageMask)
+Inst * IRManager::newPushPopSequence(Mnemonic mn, Opnd * opnd, U_32 regUsageMask)
 {
     assert(opnd!=NULL);
 
@@ -1254,8 +1254,8 @@
         }
     }
 #else
-    uint32 cb=getByteSize(size);
-    uint32 slotSize=4; 
+    U_32 cb=getByteSize(size);
+    U_32 slotSize=4; 
     cb=(cb+slotSize-1)&~(slotSize-1);
     Opnd * sizeOpnd=newImmOpnd(typeManager.getInt32Type(), cb);
     if (mn==Mnemonic_PUSH){
@@ -1295,7 +1295,7 @@
 }
 
 //_________________________________________________________________________________________________
-Opnd * IRManager::defArg(Type * type, uint32 position)
+Opnd * IRManager::defArg(Type * type, U_32 position)
 {
     assert(NULL != entryPointInst);
     Opnd * opnd=newOpnd(type);
@@ -1308,7 +1308,7 @@
 Opnd * IRManager::getRegOpnd(RegName regName)
 {
     assert(getRegSize(regName)==Constraint::getDefaultSize(getRegKind(regName))); // are we going to change this?
-    uint32 idx=( (getRegKind(regName) & 0x1f) << 4 ) | ( getRegIndex(regName)&0xf );
+    U_32 idx=( (getRegKind(regName) & 0x1f) << 4 ) | ( getRegIndex(regName)&0xf );
     if (!regOpnds[idx]){
 #ifdef _EM64T_
         Type * t = (getRegSize(regName) == OpndSize_64 ? typeManager.getUInt64Type() : typeManager.getUInt32Type());
@@ -1321,15 +1321,15 @@
 }
 void IRManager::calculateTotalRegUsage(OpndKind regKind) {
     assert(regKind == OpndKind_GPReg);
-    uint32 opndCount=getOpndCount();
-    for (uint32 i=0; i<opndCount; i++){
+    U_32 opndCount=getOpndCount();
+    for (U_32 i=0; i<opndCount; i++){
         Opnd * opnd=getOpnd(i);
         if (opnd->isPlacedIn(regKind))
             gpTotalRegUsage |= getRegMask(opnd->getRegName());
     }
 }
 //_________________________________________________________________________________________________
-uint32 IRManager::getTotalRegUsage(OpndKind regKind)const {
+U_32 IRManager::getTotalRegUsage(OpndKind regKind)const {
     return gpTotalRegUsage;
 }
 //_________________________________________________________________________________________________
@@ -1338,7 +1338,7 @@
     RegName regName=opnd->getRegName();
     if (regName==RegName_Null || getRegSize(regName)!=Constraint::getDefaultSize(getRegKind(regName)))
         return false;
-    uint32 idx=( (getRegKind(regName) & 0x1f) << 4 ) | ( getRegIndex(regName)&0xf );
+    U_32 idx=( (getRegKind(regName) & 0x1f) << 4 ) | ( getRegIndex(regName)&0xf );
     return regOpnds[idx]==opnd;
 }
 
@@ -1426,7 +1426,7 @@
 //_____________________________________________________________________________________________
 void IRManager::indexInsts() {
     const Nodes& postOrder = fg->getNodesPostOrder();
-    uint32 idx=0;
+    U_32 idx=0;
     for (Nodes::const_reverse_iterator it = postOrder.rbegin(), end = postOrder.rend(); it!=end; ++it) {
         Node* node = *it;
         if (node->isBlockNode()){
@@ -1438,10 +1438,10 @@
 }
 
 //_____________________________________________________________________________________________
-uint32 IRManager::calculateOpndStatistics(bool reindex)
+U_32 IRManager::calculateOpndStatistics(bool reindex)
 {
     POpnd * arr=&opnds.front();
-    for (uint32 i=0, n=(uint32)opnds.size(); i<n; i++){
+    for (U_32 i=0, n=(U_32)opnds.size(); i<n; i++){
         Opnd * opnd=arr[i];
         if (opnd==NULL) {
             continue;
@@ -1454,18 +1454,18 @@
         }
     }
 
-    uint32 index=0;
-    uint32 instIdx=0;
+    U_32 index=0;
+    U_32 instIdx=0;
     const Nodes& nodes = fg->getNodesPostOrder();
     for (Nodes::const_reverse_iterator  it = nodes.rbegin(), end = nodes.rend(); it!=end; ++it) {
         Node* node = *it;
         if (!node->isBlockNode()) {
             continue;
         }
-        int32 execCount=1;//(int32)node->getExecCount()*100;
+        I_32 execCount=1;//(I_32)node->getExecCount()*100;
         for (Inst * inst=(Inst*)node->getFirstInst(); inst!=NULL; inst=inst->getNextInst()){
             inst->index=instIdx++;
-            for (uint32 i=0, n=inst->getOpndCount(Inst::OpndRole_InstLevel|Inst::OpndRole_UseDef); i<n; i++){
+            for (U_32 i=0, n=inst->getOpndCount(Inst::OpndRole_InstLevel|Inst::OpndRole_UseDef); i<n; i++){
                 Opnd * opnd=inst->getOpnd(i);
                 opnd->addRefCount(index, execCount);
                 if ((inst->getOpndRoles(i)&Inst::OpndRole_Def)!=0){
@@ -1475,7 +1475,7 @@
         }
     }
 
-    for (uint32 i=0; i<IRMaxRegNames; i++){ // update predefined regOpnds to prevent losing them from the ID space
+    for (U_32 i=0; i<IRMaxRegNames; i++){ // update predefined regOpnds to prevent losing them from the ID space
         if (regOpnds[i]!=NULL) {
             regOpnds[i]->addRefCount(index, 1);
         }
@@ -1491,12 +1491,12 @@
 
     _hasLivenessInfo=false;
 
-    uint32 maxIndex=calculateOpndStatistics(true);
+    U_32 maxIndex=calculateOpndStatistics(true);
 
-    uint32 opndsBefore=(uint32)opnds.size();
+    U_32 opndsBefore=(U_32)opnds.size();
     opnds.resize(opnds.size()+maxIndex);
     POpnd * arr=&opnds.front();
-    for (uint32 i=0; i<opndsBefore; i++){
+    for (U_32 i=0; i<opndsBefore; i++){
         Opnd * opnd=arr[i];
         if (opnd->id!=EmptyUint32)
             arr[opndsBefore+opnd->id]=opnd;
@@ -1507,9 +1507,9 @@
 }
 
 //_____________________________________________________________________________________________
-void IRManager::fixLivenessInfo( uint32 * map )
+void IRManager::fixLivenessInfo( U_32 * map )
 {
-    uint32 opndCount = getOpndCount();
+    U_32 opndCount = getOpndCount();
     const Nodes& nodes = fg->getNodes();
     for (Nodes::const_iterator it = nodes.begin(), end = nodes.end(); it!=end; ++it) {
         CGNode* node = (CGNode*)*it;
@@ -1527,7 +1527,7 @@
     _hasLivenessInfo=false;
     LoopTree* lt = fg->getLoopTree();
     lt->rebuild(false);
-    const uint32 opndCount = getOpndCount();    
+    const U_32 opndCount = getOpndCount();    
 
     const Nodes& nodes = fg->getNodesPostOrder();
     //clean all prev. liveness info
@@ -1535,15 +1535,15 @@
         CGNode* node = (CGNode*)*it;
         node->getLiveAtEntry()->resizeClear(opndCount);
     }
-    uint32 loopDepth = lt->getMaxLoopDepth();
-    uint32 nIterations = loopDepth + 1;
+    U_32 loopDepth = lt->getMaxLoopDepth();
+    U_32 nIterations = loopDepth + 1;
 #ifdef _DEBUG
     nIterations++; //one more extra iteration to prove that nothing changed
 #endif 
     BitSet tmpLs(memoryManager, opndCount);
     bool changed = true;
     Node* exitNode = fg->getExitNode();
-    for (uint32 iteration=0; iteration < nIterations; iteration++) {
+    for (U_32 iteration=0; iteration < nIterations; iteration++) {
         changed = false;
         for (Nodes::const_iterator it = nodes.begin(),end = nodes.end();it!=end; ++it) {
             CGNode* node = (CGNode*)*it;
@@ -1567,7 +1567,7 @@
             }
             bool processNode = true;
             if (iteration > 0) {
-                uint32 depth = lt->getLoopDepth(node);
+                U_32 depth = lt->getLoopDepth(node);
                 processNode = iteration <= depth;
 #ifdef _DEBUG
                 processNode = processNode || iteration == nIterations-1; //last iteration will check all blocks
@@ -1607,7 +1607,7 @@
 {
     assert(ls.getSetSize()<=getOpndCount());
     const Edges& edges=node->getOutEdges();
-    uint32 i=0;
+    U_32 i=0;
     for (Edges::const_iterator ite = edges.begin(), ende = edges.end(); ite!=ende; ++ite, ++i) {
         Edge* edge = *ite;
         CGNode * succ=(CGNode*)edge->getTargetNode();
@@ -1624,21 +1624,21 @@
 void IRManager::updateLiveness(const Inst * inst, BitSet & ls) const 
 {
     const Opnd * const * opnds = inst->getOpnds();
-    uint32 opndCount = inst->getOpndCount();
+    U_32 opndCount = inst->getOpndCount();
 
-    for (uint32 i = 0; i < opndCount; i++){
+    for (U_32 i = 0; i < opndCount; i++){
         const Opnd * opnd = opnds[i];
-        uint32 id = opnd->getId();
+        U_32 id = opnd->getId();
         if (inst->isLiveRangeEnd(i))
             ls.setBit(id, false);
         else if (inst->isLiveRangeStart(i))
             ls.setBit(id, true);
     }
-    for (uint32 i = 0; i < opndCount; i++){
+    for (U_32 i = 0; i < opndCount; i++){
         const Opnd * opnd = opnds[i];
         if (opnd->getMemOpndKind() != MemOpndKind_Null){
             const Opnd * const * subOpnds = opnd->getMemOpndSubOpnds();
-            for (uint32 j = 0; j < MemOpndSubOpndKind_Count; j++){
+            for (U_32 j = 0; j < MemOpndSubOpndKind_Count; j++){
                 const Opnd * subOpnd = subOpnds[j];
                 if (subOpnd != NULL && subOpnd->isSubjectForLivenessAnalysis())
                     ls.setBit(subOpnd->getId(), true);
@@ -1649,10 +1649,10 @@
 }
 
 //_____________________________________________________________________________________________
-uint32 IRManager::getRegUsageFromLiveSet(BitSet * ls, OpndKind regKind)const
+U_32 IRManager::getRegUsageFromLiveSet(BitSet * ls, OpndKind regKind)const
 {
     assert(ls->getSetSize()<=getOpndCount());
-    uint32 mask=0;
+    U_32 mask=0;
     BitSet::IterB ib(*ls);
     for (int i = ib.getNext(); i != -1; i = ib.getNext()){
         Opnd * opnd=getOpnd(i);
@@ -1664,7 +1664,7 @@
 
 
 //_____________________________________________________________________________________________
-void IRManager::getRegUsageAtExit(const Node * node, OpndKind regKind, uint32 & mask)const
+void IRManager::getRegUsageAtExit(const Node * node, OpndKind regKind, U_32 & mask)const
 {
     assert(node->isBlockNode());
     const Edges& edges=node->getOutEdges();
@@ -1676,13 +1676,13 @@
 }
 
 //_____________________________________________________________________________________________
-void IRManager::updateRegUsage(const Inst * inst, OpndKind regKind, uint32 & mask)const
+void IRManager::updateRegUsage(const Inst * inst, OpndKind regKind, U_32 & mask)const
 {
     Inst::Opnds opnds(inst, Inst::OpndRole_All);
     for (Inst::Opnds::iterator it = opnds.begin(); it != opnds.end(); it = opnds.next(it)){
         Opnd * opnd=inst->getOpnd(it);
         if (opnd->isPlacedIn(regKind)){
-            uint32 m=getRegMask(opnd->getRegName());
+            U_32 m=getRegMask(opnd->getRegName());
             if (inst->isLiveRangeEnd(it))
                 mask &= ~m;
             else if (inst->isLiveRangeStart(it))
@@ -1694,7 +1694,7 @@
 //_____________________________________________________________________________________________
 void IRManager::resetOpndConstraints()
 {
-    for (uint32 i=0, n=getOpndCount(); i<n; i++){
+    for (U_32 i=0, n=getOpndCount(); i<n; i++){
         Opnd * opnd=getOpnd(i);
         opnd->setCalculatedConstraint(opnd->getConstraint(Opnd::ConstraintKind_Initial));
     }
@@ -1737,7 +1737,7 @@
                     }
 
                     // Put inputs on the stack.
-                    for (uint32 i = 0, n = (uint32)stackOpndInfos.size(); i < n; i++) {
+                    for (U_32 i = 0, n = (U_32)stackOpndInfos.size(); i < n; i++) {
                         Opnd* opnd = opnds[stackOpndInfos[i].opndIndex];
                         Inst * pushInst = newCopyPseudoInst(Mnemonic_PUSH, opnd);
                         pushInst->insertBefore(instToPrepend);
@@ -1773,23 +1773,23 @@
 }
 
 //_____________________________________________________________________________________________
-uint32 IRManager::calculateStackDepth()
+U_32 IRManager::calculateStackDepth()
 {
     MemoryManager mm("calculateStackDepth");
-    StlVector<int32> stackDepths(mm, fg->getNodeCount(), -1);
-    int32 maxMethodStackDepth = -1;    
+    StlVector<I_32> stackDepths(mm, fg->getNodeCount(), -1);
+    I_32 maxMethodStackDepth = -1;    
     
     const Nodes& nodes = fg->getNodesPostOrder();
     //iterating in topological (reverse postorder) order
     for (Nodes::const_reverse_iterator itn = nodes.rbegin(), endn = nodes.rend(); itn!=endn; ++itn) {
         Node* node = *itn;
         if (node->isBlockNode() || (node->isDispatchNode() && node!=fg->getUnwindNode())) {
-            int32 stackDepth=-1;
+            I_32 stackDepth=-1;
             const Edges& edges=node->getInEdges();
             for (Edges::const_iterator ite = edges.begin(), ende = edges.end(); ite!=ende; ++ite) {
                 Edge* edge = *ite;
                 Node * pred=edge->getSourceNode();
-                int32 predStackDepth=stackDepths[pred->getDfNum()];
+                I_32 predStackDepth=stackDepths[pred->getDfNum()];
                 if (predStackDepth>=0){
                     assert(stackDepth==-1 || stackDepth==predStackDepth);
                     stackDepth=predStackDepth;
@@ -1807,9 +1807,9 @@
                     Inst::Opnds::iterator it = opnds.begin();
                     if (it != opnds.end() && inst->getOpnd(it)->isPlacedIn(STACK_REG)) {
                         if (inst->getMnemonic()==Mnemonic_ADD)
-                            stackDepth -= (int32)inst->getOpnd(opnds.next(it))->getImmValue();
+                            stackDepth -= (I_32)inst->getOpnd(opnds.next(it))->getImmValue();
                         else if (inst->getMnemonic()==Mnemonic_SUB)
-                            stackDepth += (int32)inst->getOpnd(opnds.next(it))->getImmValue();
+                            stackDepth += (I_32)inst->getOpnd(opnds.next(it))->getImmValue();
                         else
                             assert(0);
                     }else{
@@ -1833,7 +1833,7 @@
         }
     }
     assert(maxMethodStackDepth>=0);
-    return (uint32)maxMethodStackDepth;
+    return (U_32)maxMethodStackDepth;
 }
 
 //_____________________________________________________________________________________________
@@ -1853,7 +1853,7 @@
     }
 }
 //_____________________________________________________________________________________________
-void IRManager::expandSystemExceptions(uint32 reservedForFlags)
+void IRManager::expandSystemExceptions(U_32 reservedForFlags)
 {
     calculateOpndStatistics();
     StlMap<Opnd *, POINTER_SIZE_INT> checkOpnds(getMemoryManager());
@@ -1922,7 +1922,7 @@
                             zero = (int64)(POINTER_SIZE_INT)VMInterface::getHeapBase();
                         }
                         Opnd* zeroOpnd = NULL;
-                        if((POINTER_SIZE_INT)zero == (uint32)zero) { // heap base fits into 32 bits
+                        if((POINTER_SIZE_INT)zero == (U_32)zero) { // heap base fits into 32 bits
                             zeroOpnd = newImmOpnd(opnd->getType(), zero);
                         } else { // zero can not be an immediate at comparison
                             Opnd* zeroImm = newImmOpnd(typeManager.getIntPtrType(), zero);
@@ -2047,7 +2047,7 @@
 //_____________________________________________________________________________________________
 void IRManager::resolveRuntimeInfo()
 {
-    for (uint32 i=0, n=getOpndCount(); i<n; i++){
+    for (U_32 i=0, n=getOpndCount(); i<n; i++){
         Opnd * opnd=getOpnd(i);
         resolveRuntimeInfo(opnd);
     }
@@ -2097,7 +2097,7 @@
             /** The value of the operand is the address where the interned version of the string is stored*/
             {
             MethodDesc*  mDesc = (MethodDesc*)info->getValue(0);
-            uint32 token = (uint32)(POINTER_SIZE_INT)info->getValue(1);
+            U_32 token = (U_32)(POINTER_SIZE_INT)info->getValue(1);
             value = (POINTER_SIZE_INT) compilationInterface.getStringInternAddr(mDesc,token);
             }break;
         case Opnd::RuntimeInfo::Kind_StaticFieldAddress:
@@ -2208,11 +2208,11 @@
     typedef StlVector<Inst*> InstList;      // to register all instruction referenced an operand
     typedef StlVector<InstList*> OpndList;  // one entry for each operand, instruction register or 0
 
-    const uint32 opnd_count = getOpndCount();
+    const U_32 opnd_count = getOpndCount();
     OpndList opnd_list(getMemoryManager(), opnd_count); // fixed size
 
 //  Watch only MemOpndKind_Heap operands - all others are simply ignored.
-    for (uint32 i = 0; i != opnd_count; ++i) {
+    for (U_32 i = 0; i != opnd_count; ++i) {
         InstList* ilp = 0; 
         if (getOpnd(i)->getMemOpndKind() == MemOpndKind_Heap)
             ilp = new (getMemoryManager()) InstList(getMemoryManager());
@@ -2238,7 +2238,7 @@
         }
     }
 
-    for (uint32 i = 0; i != opnd_count; ++i) {
+    for (U_32 i = 0; i != opnd_count; ++i) {
         InstList* ilp = opnd_list.at(i);
         if (ilp != 0 && ilp->size() > 1) {
         //  Error found
@@ -2287,11 +2287,11 @@
 bool IRManager::verifyHeapAddressTypes()
 {
     bool failed=false;
-    for (uint32 i=0, n=getOpndCount(); i<n; i++){
+    for (U_32 i=0, n=getOpndCount(); i<n; i++){
         Opnd * opnd = getOpnd(i);
         if (opnd->isPlacedIn(OpndKind_Mem) && opnd->getMemOpndKind()==MemOpndKind_Heap){
             Opnd * properTypeSubOpnd=NULL;
-            for (uint32 j=0; j<MemOpndSubOpndKind_Count; j++){
+            for (U_32 j=0; j<MemOpndSubOpndKind_Count; j++){
                 Opnd * subOpnd=opnd->getMemOpndSubOpnd((MemOpndSubOpndKind)j);
                 if (subOpnd!=NULL){
                     Type * type=subOpnd->getType();
@@ -2389,7 +2389,7 @@
     if (isLogEnabled(LogStream::IRDUMP)) 
         Log::printStageBegin(log(LogStream::IRDUMP).out(), stageId, "IA32", getName(), getTagName());
 
-    uint32 needInfo=getNeedInfo();
+    U_32 needInfo=getNeedInfo();
     if (needInfo & NeedInfo_LivenessInfo)
         irManager->updateLivenessInfo();
     if (needInfo & NeedInfo_LoopInfo)
@@ -2397,7 +2397,7 @@
 
     runImpl();
 
-    uint32 sideEffects=getSideEffects();
+    U_32 sideEffects=getSideEffects();
     if (sideEffects & SideEffect_InvalidatesLivenessInfo)
         irManager->invalidateLivenessInfo();
     if (sideEffects & SideEffect_InvalidatesLoopInfo)
@@ -2413,14 +2413,14 @@
 }
 
 
-uint32 SessionAction::getSideEffects()const
+U_32 SessionAction::getSideEffects()const
 {
-    return ~(uint32)0;
+    return ~(U_32)0;
 }
 
-uint32 SessionAction::getNeedInfo()const
+U_32 SessionAction::getNeedInfo()const
 {
-    return ~(uint32)0;
+    return ~(U_32)0;
 }
 
 bool SessionAction::verify(bool force)

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRManager.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRManager.h?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRManager.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRManager.h Thu May 22 06:33:38 2008
@@ -52,7 +52,7 @@
 namespace Ia32
 {
 
-const char * newString(MemoryManager& mm, const char * str, uint32 length=EmptyUint32);
+const char * newString(MemoryManager& mm, const char * str, U_32 length=EmptyUint32);
 
 //========================================================================================
 // STL aux classes (need to be moved somewhere)
@@ -124,8 +124,8 @@
     struct AliasRelation
     {
         Opnd * outerOpnd;
-        uint32 offset;
-        AliasRelation(Opnd * oo =0, uint32 offs=0)
+        U_32 offset;
+        AliasRelation(Opnd * oo =0, U_32 offs=0)
             :outerOpnd(oo), offset(offs){}
     };
 
@@ -144,15 +144,15 @@
 
     ConstantAreaItem *  newConstantAreaItem(float f);
     ConstantAreaItem *  newConstantAreaItem(double d);
-    ConstantAreaItem *  newSwitchTableConstantAreaItem(uint32 numTargets);
+    ConstantAreaItem *  newSwitchTableConstantAreaItem(U_32 numTargets);
     ConstantAreaItem *  newInternalStringConstantAreaItem(const char * str);
-    ConstantAreaItem *  newBinaryConstantAreaItem(uint32 size, const void * pv);
+    ConstantAreaItem *  newBinaryConstantAreaItem(U_32 size, const void * pv);
 
     Opnd * newFPConstantMemOpnd(float f, Opnd * baseOpnd=0, BasicBlock * bb=0);
     Opnd * newFPConstantMemOpnd(double f, Opnd * baseOpnd=0, BasicBlock * bb=0);
 
     Opnd * newInternalStringConstantImmOpnd(const char * str);
-    Opnd * newBinaryConstantImmOpnd(uint32 size, const void * pv);
+    Opnd * newBinaryConstantImmOpnd(U_32 size, const void * pv);
 
     /** Creates a new operand assigned to a physical register */
     Opnd * newRegOpnd(Type * type, RegName reg);
@@ -162,7 +162,7 @@
     /** Shortcut: Creates a new operand assigned to a memory location of kind Heap */
     Opnd * newMemOpnd(Type * type, Opnd * base, Opnd * index=0, Opnd * scale=0, Opnd * displacement=0, RegName segReg=RegName_Null);
     /** Shortcut: Creates a new operand assigned to a memory location of kind k */
-    Opnd * newMemOpnd(Type * type, MemOpndKind k, Opnd * base, int32 displacement, RegName segReg=RegName_Null);
+    Opnd * newMemOpnd(Type * type, MemOpndKind k, Opnd * base, I_32 displacement, RegName segReg=RegName_Null);
 
     Opnd * newMemOpndAutoKind(Type * type, MemOpndKind k, Opnd * opnd0, Opnd * opnd1=0, Opnd * opnd2=0);
     Opnd * newMemOpndAutoKind(Type * type, Opnd * opnd0, Opnd * opnd1=0, Opnd * opnd2=0)
@@ -178,9 +178,9 @@
         );
 
     /** Creates a new Extended Inst defined by mnemonic with up to 8 operands */
-    Inst * newInstEx(Mnemonic mnemonic, uint32 defCount, Opnd * opnd0=0, Opnd * opnd1=0, Opnd * opnd2=0);
+    Inst * newInstEx(Mnemonic mnemonic, U_32 defCount, Opnd * opnd0=0, Opnd * opnd1=0, Opnd * opnd2=0);
 
-    Inst * newInstEx(Mnemonic mnemonic, uint32 defCount, 
+    Inst * newInstEx(Mnemonic mnemonic, U_32 defCount, 
         Opnd * opnd0, Opnd * opnd1, Opnd * opnd2, Opnd * opnd3, 
         Opnd * opnd4, Opnd * opnd5=0, Opnd * opnd6=0, Opnd * opnd7=0
         );
@@ -193,19 +193,19 @@
     */
     BranchInst * newBranchInst(Mnemonic mnemonic, Node* trueTarget, Node* falseTarget, Opnd * targetOpnd=0); 
 
-    SwitchInst * newSwitchInst(uint32 numTargets, Opnd * index);
+    SwitchInst * newSwitchInst(U_32 numTargets, Opnd * index);
 
     JumpInst * newJumpInst(Opnd * targetOpnd=0); 
 
     /** Creates a CallInst instance. */
     CallInst *  newCallInst(Opnd * targetOpnd, const CallingConvention * cc, 
-        uint32 numArgs, Opnd ** args, Opnd * retOpnd);
+        U_32 numArgs, Opnd ** args, Opnd * retOpnd);
 
     /** A specialization of the newCallInst to create a VM Helper CallInst. */
     CallInst *  newRuntimeHelperCallInst(VM_RT_SUPPORT helperId, 
-        uint32 numArgs, Opnd ** args, Opnd * retOpnd);
+        U_32 numArgs, Opnd ** args, Opnd * retOpnd);
     /** A specialization of the newCallInst to create an internal helper CallInst. */
-    CallInst *  newInternalRuntimeHelperCallInst(const char * internalHelperID, uint32 numArgs, Opnd ** args, Opnd * retOpnd);
+    CallInst *  newInternalRuntimeHelperCallInst(const char * internalHelperID, U_32 numArgs, Opnd ** args, Opnd * retOpnd);
 
     void registerInternalHelperInfo(const char * internalHelperID, const InternalHelperInfo& info);
     const InternalHelperInfo *  getInternalHelperInfo(const char * internalHelperID)const
@@ -214,14 +214,14 @@
     const char * newInternalString(const char * originalString)const
     { return newString(memoryManager, originalString); }
 
-    AliasPseudoInst * newAliasPseudoInst(Opnd * targetOpnd, Opnd * sourceOpnd, uint32 offset);
-    AliasPseudoInst * newAliasPseudoInst(Opnd * targetOpnd, uint32 sourceOpndCount, Opnd ** sourceOpnds);
+    AliasPseudoInst * newAliasPseudoInst(Opnd * targetOpnd, Opnd * sourceOpnd, U_32 offset);
+    AliasPseudoInst * newAliasPseudoInst(Opnd * targetOpnd, U_32 sourceOpndCount, Opnd ** sourceOpnds);
 
     CMPXCHG8BPseudoInst * newCMPXCHG8BPseudoInst(Opnd* mem, Opnd* edx, Opnd* eax, Opnd* ecx, Opnd* ebx);
 
     CatchPseudoInst * newCatchPseudoInst(Opnd * exception);
 
-    Inst * newI8PseudoInst(Mnemonic mnemonic, uint32 defCount,
+    Inst * newI8PseudoInst(Mnemonic mnemonic, U_32 defCount,
             Opnd * opnd0, Opnd * opnd1=0, Opnd * opnd2=0, Opnd * opnd3=0
         );
 
@@ -240,7 +240,7 @@
     */
     EntryPointPseudoInst * newEntryPointPseudoInst(const CallingConvention * cc);
 
-    Inst * newCopySequence(Mnemonic mn, Opnd * opnd0, Opnd * opnd1=NULL, uint32 regUsageMask=(uint32)~0, uint32 flagsRegUsageMask=(uint32)~0);
+    Inst * newCopySequence(Mnemonic mn, Opnd * opnd0, Opnd * opnd1=NULL, U_32 regUsageMask=(U_32)~0, U_32 flagsRegUsageMask=(U_32)~0);
 
     /** Creates an EmptyPseudoInst instruction to fill BB, which shoud not be cosidered as an empty one.
     */
@@ -266,11 +266,11 @@
 
     const CallingConvention * getCallingConvention()const { assert(NULL!=entryPointInst); return getEntryPointInst()->getCallingConventionClient().getCallingConvention(); }
 
-    Opnd * defArg(Type * type, uint32 position);
+    Opnd * defArg(Type * type, U_32 position);
 
     void applyCallingConventions();
 
-    uint32 getMaxInstId() { return instId; }
+    U_32 getMaxInstId() { return instId; }
 
     //-----------------------------------------------------------------------------------------------
     /** Updates operands resolving their RuntimeInfo */
@@ -287,7 +287,7 @@
     /** calculate liveness information */
     void calculateLivenessInfo();
 
-    void fixLivenessInfo( uint32 * map = NULL );
+    void fixLivenessInfo( U_32 * map = NULL );
 
     bool hasLivenessInfo()const
     { 
@@ -316,20 +316,20 @@
 
     /** returns the reg usage information for node entry 
     as uint32containing bit mask for used registers */
-    uint32 getRegUsageAtEntry(const Node * node, OpndKind regKind)const
+    U_32 getRegUsageAtEntry(const Node * node, OpndKind regKind)const
     {   return getRegUsageFromLiveSet(getLiveAtEntry(node), regKind);   }
 
     /** returns the reg usage information for node exit 
-    as uint32 containing bit mask for used registers */
-    void getRegUsageAtExit(const Node * node, OpndKind regKind, uint32 & mask)const;
+    as U_32 containing bit mask for used registers */
+    void getRegUsageAtExit(const Node * node, OpndKind regKind, U_32 & mask)const;
 
     /** use this function to update reg usage in a single postorder pass when liveness info is calculated */
-    void updateRegUsage(const Inst * inst, OpndKind regKind, uint32 & mask)const;
+    void updateRegUsage(const Inst * inst, OpndKind regKind, U_32 & mask)const;
 
-    uint32 getRegUsageFromLiveSet(BitSet * ls, OpndKind regKind)const;
+    U_32 getRegUsageFromLiveSet(BitSet * ls, OpndKind regKind)const;
 
     /** returns Constraint containing bit mask for all registers used in the method */
-    uint32 getTotalRegUsage(OpndKind regKind)const;
+    U_32 getTotalRegUsage(OpndKind regKind)const;
 
     void calculateTotalRegUsage(OpndKind regKind);
 
@@ -373,7 +373,7 @@
     ControlFlowGraph* createSubCFG(bool withReturn, bool withUnwind);
 
     /** expands SystemExceptionCheckPseudoInst */
-    void expandSystemExceptions(uint32 reservedForFlags);
+    void expandSystemExceptions(U_32 reservedForFlags);
 
     /** generater code to throw noted type exception, set for code BC offset and include into basic block*/
     void throwException(ObjectType* excType, uint16 bcOffset, Node* basicBlock);
@@ -389,25 +389,25 @@
         2) (re-)calculates operand statistics (ref counts)
         3) If reindex is true it sets new sequential Opnd::id 
         for all operands with refcount>0(used for packOpnds)*/
-    uint32 calculateOpndStatistics(bool reindex=false);
+    U_32 calculateOpndStatistics(bool reindex=false);
 
     /** this function performs the following:
         1) calls calculateOpndStatistics().
         2) removes operands with zero ref counts from the internal
-        array of all operands accessed via IRManager::getOpnd(uint32).
+        array of all operands accessed via IRManager::getOpnd(U_32).
     */
     void packOpnds();
 
     /** returns the number of operands in the internal
-        array of all operands accessed via IRManager::getOpnd(uint32).
+        array of all operands accessed via IRManager::getOpnd(U_32).
         This number is affected by packOpnds which removes from the array all operands which
         are no longer in the LIR.
     */
-    uint32 getOpndCount()const
-    { return (uint32)opnds.size(); }
+    U_32 getOpndCount()const
+    { return (U_32)opnds.size(); }
 
     /** returns an operand from the internal array of all operands by its ID. */
-    Opnd * getOpnd(uint32 id)const
+    Opnd * getOpnd(U_32 id)const
     { 
         assert(id<opnds.size()); return opnds[id]; 
     }
@@ -416,18 +416,18 @@
     void resetOpndConstraints();
 
     //-----------------------------------------------------------------------------------------------
-    uint32 assignInnerMemOpnd(Opnd * outerOpnd, Opnd* innerOpnds, uint32 offset);
-    void assignInnerMemOpnds(Opnd * outerOpnd, Opnd** innerOpnds, uint32 innerOpndCount);
+    U_32 assignInnerMemOpnd(Opnd * outerOpnd, Opnd* innerOpnds, U_32 offset);
+    void assignInnerMemOpnds(Opnd * outerOpnd, Opnd** innerOpnds, U_32 innerOpndCount);
     void layoutAliasPseudoInstOpnds(AliasPseudoInst * inst);
     void getAliasRelations(AliasRelation * relations);
     void layoutAliasOpnds();
-    uint32 getLayoutOpndAlignment(Opnd * opnd);
+    U_32 getLayoutOpndAlignment(Opnd * opnd);
     void finalizeCallSites();
 
     /** Calculates displacement from stack entry point
         for every instruction and returns maximum stack depth needed for a method
     */
-    uint32 calculateStackDepth();
+    U_32 calculateStackDepth();
     //-----------------------------------------------------------------------------------------------
     bool verify();
     bool verifyOpnds() const;
@@ -468,8 +468,8 @@
     bool isRegisterSetLocked(OpndKind regKind){ return true; } 
     void lockRegisterSet(OpndKind regKind){ } 
 
-    void setVerificationLevel(uint32 v){ verificationLevel=v; }
-    uint32 getVerificationLevel()const{ return verificationLevel; }
+    void setVerificationLevel(U_32 v){ verificationLevel=v; }
+    U_32 getVerificationLevel()const{ return verificationLevel; }
 
     bool refsAreCompressed() {return refsCompressed;}
 protected:
@@ -480,11 +480,11 @@
 
     void addOpnd(Opnd * opnd);
 
-    void addAliasRelation(AliasRelation * relations, Opnd * opndOuter, Opnd * opndInner, uint32 offset);
+    void addAliasRelation(AliasRelation * relations, Opnd * opndOuter, Opnd * opndInner, U_32 offset);
 
-    Inst * newCopySequence(Opnd * targetOpnd, Opnd * sourceOpnd, uint32 regUsageMask=(uint32)~0, uint32 flagsRegUsageMask=(uint32)~0);
-    Inst * newPushPopSequence(Mnemonic mn, Opnd * opnd, uint32 regUsageMask=(uint32)~0);
-    Inst * newMemMovSequence(Opnd * targetOpnd, Opnd * sourceOpnd, uint32 regUsageMask, bool checkSource=false);
+    Inst * newCopySequence(Opnd * targetOpnd, Opnd * sourceOpnd, U_32 regUsageMask=(U_32)~0, U_32 flagsRegUsageMask=(U_32)~0);
+    Inst * newPushPopSequence(Mnemonic mn, Opnd * opnd, U_32 regUsageMask=(U_32)~0);
+    Inst * newMemMovSequence(Opnd * targetOpnd, Opnd * sourceOpnd, U_32 regUsageMask, bool checkSource=false);
 
     void initInitialConstraints();
     Constraint createInitialConstraint(Type::Tag t)const;
@@ -497,12 +497,12 @@
     MethodDesc              &       methodDesc;
     CompilationInterface    &       compilationInterface;
 
-    uint32                          opndId;
-    uint32                          instId;
+    U_32                          opndId;
+    U_32                          instId;
 
     OpndVector                      opnds;
 
-    uint32                          gpTotalRegUsage;
+    U_32                          gpTotalRegUsage;
 
     EntryPointPseudoInst *          entryPointInst;
 
@@ -514,7 +514,7 @@
 
     ConstCharStringToVoidPtrMap     infoMap;
 
-    uint32                          verificationLevel;
+    U_32                          verificationLevel;
 
     bool                            hasCalls;
     bool                            hasNonExceptionCalls;
@@ -577,7 +577,7 @@
     The returned value is |-ed from the NeedInfo enum
 
     Optional, defaults to all possible info */
-    virtual uint32 getNeedInfo()const;
+    virtual U_32 getNeedInfo()const;
 
     /** Implementors override getSideEffects() to indicate the side effect 
     of the pass (currently in terms of common info like liveness, loop, etc.)
@@ -585,7 +585,7 @@
     The returned value is |-ed from the SideEffect enum
 
     Optional, defaults to all possible side effects */
-    virtual uint32 getSideEffects()const;
+    virtual U_32 getSideEffects()const;
     /**
      * Forces dominator tree to be valid
      */
@@ -607,7 +607,7 @@
 
     IRManager * irManager;
 
-    uint32      stageId;
+    U_32      stageId;
 };
 
 



Mime
View raw message