harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From var...@apache.org
Subject svn commit: r512698 [1/2] - in /harmony/enhanced/drlvm/trunk/vm/jitrino/src: codegenerator/ codegenerator/ia32/ dynopt/ jet/ main/ optimizer/ shared/ vm/ vm/drl/
Date Wed, 28 Feb 2007 10:56:23 GMT
Author: varlax
Date: Wed Feb 28 02:56:15 2007
New Revision: 512698

URL: http://svn.apache.org/viewvc?view=rev&rev=512698
Log:
Partial fix to HARMONY-3197 [drlvm][jit][winx64] Jitrino compilation fixed`.
Tested on SUSE10@ia32, SUSE9@x64, WinXP@ia32, Win2003@x64, SUSE9@ipf

Modified:
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/CodeGenIntfc.h
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32BBPolling.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32BCMap.h
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32CodeEmitter.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32CodeLayoutBottomUp.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32ConstraintsResolver.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32GCMap.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32GCMap.h
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32GCSafePoints.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRManager.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRManager.h
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32Inst.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InternalProfiler.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InternalTrace.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32Printer.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32RegAlloc2.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32RegAlloc3.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32RegAllocCheck.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32RuntimeInterface.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32SpillGen.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32StackInfo.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32StackLayout.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32WebMaker.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/dynopt/EdgeProfiler.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/dynopt/StaticProfiler.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/dynopt/ValueProfiler.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_meth.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/csig.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/csig.h
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/enc.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/enc.h
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/jdefs.h
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/rt.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/main/PMF.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/Inst.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/Inst.h
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/escanalyzer.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/inliner.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/inliner.h
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/multiplybyconstant.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/ControlFlowGraph.h
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/InlineInfo.h
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/Interval.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/LoopTree.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/PlatformDependant.h
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/VMInterface.h
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/drl/DrlVMInterface.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/drl/DrlVMInterface.h

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/CodeGenIntfc.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/CodeGenIntfc.h?view=diff&rev=512698&r1=512697&r2=512698
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/CodeGenIntfc.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/CodeGenIntfc.h Wed Feb 28 02:56:15 2007
@@ -600,6 +600,7 @@
 class InlineInfoMap {
     class OffsetPair {
     public:
+        OffsetPair() : offset(0), inline_info(NULL) {}
         OffsetPair(uint32 off, InlineInfo* ii) : offset(off), inline_info(ii) {}
         uint32 offset;
         InlineInfo* inline_info;

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32BBPolling.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32BBPolling.cpp?view=diff&rev=512698&r1=512697&r2=512698
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32BBPolling.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32BBPolling.cpp Wed Feb 28 02:56:15 2007
@@ -84,7 +84,7 @@
 #endif
     }
 
-    uint32  numberOfAffectedEdges()     { return eligibleEdges.size(); }
+    uint32  numberOfAffectedEdges()     { return (uint32)eligibleEdges.size(); }
     Edge*   getAffectedEdge(uint32 i)   { assert(i < eligibleEdges.size()); return eligibleEdges[i]; }
 
     Opnd*   getOrCreateTLSBaseReg(Edge* e);
@@ -280,10 +280,6 @@
          Opnd* tlsBase  = irManager.newOpnd(tlsBaseType);
          bbpFlagAddrBlock->appendInst(irManager.newCallInst(target, &CallingConvention_STDCALL, 0, NULL, tlsBase));
 #else // PLATFORM_POSIX
-#ifdef _EM64T_
-	// TODO: #error "BBP not implemented on windows/em64t"
-	assert(0);
-#endif
         // TLS base can be obtained from [fs:0x14]
         Opnd* tlsBase = irManager.newMemOpnd(tlsBaseType, MemOpndKind_Any, NULL, 0x14, RegName_FS);
 #endif // PLATFORM_POSIX
@@ -484,7 +480,7 @@
             if ( !toppestLoopHeader[id] ) {
                 toppestLoopHeader[id] = loopHeader;
                 // here we need to remember all otheredges and their start index for particular loopHeader
-                otherStartNdx[loopHeader->getId()] = otherEdges.size();
+                otherStartNdx[loopHeader->getId()] = (uint32)otherEdges.size();
                 const Edges& edges = loopHeader->getInEdges();
                 for (Edges::const_iterator ite = edges.begin(), ende = edges.end(); ite!=ende; ++ite) {
                     Edge* e = *ite;

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32BCMap.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32BCMap.h?view=diff&rev=512698&r1=512697&r2=512698
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32BCMap.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32BCMap.h Wed Feb 28 02:56:15 2007
@@ -47,7 +47,7 @@
     }
 
     POINTER_SIZE_INT getByteSize() {
-        POINTER_SIZE_INT mapSize = theMap->size();
+        POINTER_SIZE_INT mapSize = (POINTER_SIZE_INT)theMap->size();
 
         return  (mapSize * (byteCodeOffsetSize + wordSize) + wordSize);
     }
@@ -58,7 +58,7 @@
         POINTER_SIZE_INT mapSize;
         POINTER_SIZE_INT i = 0;
 
-        mapSize = theMap->size();
+        mapSize = (POINTER_SIZE_INT)theMap->size();
         data[0] = mapSize; //store map size
         data = data + 1;
 

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32CodeEmitter.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32CodeEmitter.cpp?view=diff&rev=512698&r1=512697&r2=512698
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32CodeEmitter.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32CodeEmitter.cpp Wed Feb 28 02:56:15 2007
@@ -221,7 +221,7 @@
 void CodeEmitter::ConstantAreaLayout::calculateItemOffsets()
 {
     POINTER_SIZE_INT offset=0;
-    for (uint32 i=0, n=items.size(); i<n; ++i){
+    for (size_t i=0, n=items.size(); i<n; ++i){
         ConstantAreaItem * item=items[i];
         POINTER_SIZE_INT size=item->getSize();
         POINTER_SIZE_INT alignment=size; 
@@ -250,7 +250,7 @@
     dataBlock=(dataBlock+blockAlignment-1)&~(blockAlignment-1);
     assert(dataBlock % blockAlignment == 0);
 
-    for (uint32 i=0, n=items.size(); i<n; ++i){
+    for (size_t i=0, n=items.size(); i<n; ++i){
         ConstantAreaItem * item=items[i];
         POINTER_SIZE_INT offset=(POINTER_SIZE_INT)item->getAddress();
         item->setAddress((void*)(dataBlock+offset));
@@ -265,7 +265,7 @@
 #ifdef _DEBUG
     const Nodes& nodes = irManager->getFlowGraph()->getNodes();
 #endif
-    for (uint32 i=0, n=items.size(); i<n; ++i){
+    for (size_t i=0, n=items.size(); i<n; ++i){
         ConstantAreaItem * item=items[i];
         if (item->hasKind(ConstantAreaItem::Kind_SwitchTableConstantAreaItem)){
             void ** table = (void **)item->getAddress();
@@ -323,7 +323,9 @@
                         Log::out() << "has inline info:" << std::endl;
                         callinst->getInlineInfo()->printLevels(Log::out());
                         // report offset 1 bundle forward
-                        inlineMap->registerOffset((POINTER_SIZE_INT)inst->getCodeStartAddr()+inst->getCodeSize() - (POINTER_SIZE_INT)irManager->getCodeStartAddr(), callinst->getInlineInfo());
+                        POINTER_SIZE_INT offset = (POINTER_SIZE_INT)inst->getCodeStartAddr() + inst->getCodeSize() - (POINTER_SIZE_INT)irManager->getCodeStartAddr();
+                        assert(fit32(offset));
+                        inlineMap->registerOffset((uint32)offset, callinst->getInlineInfo());
                     }
                     Log::out() << std::endl;
                 }
@@ -377,17 +379,18 @@
 
         
         if (alignment && lt->isLoopHeader(bb) && ((POINTER_SIZE_INT)ip & (alignment-1))) {
-            POINTER_SIZE_INT align = alignment - ((POINTER_SIZE_INT)ip & (alignment-1));
+            unsigned align = alignment - (unsigned)((POINTER_SIZE_INT)ip & (alignment-1));
             ip = (uint8*)EncoderBase::nops((char*)ip, align);
         }
 
         uint8 * blockStartIp = ip;
-        bb->setCodeOffset( blockStartIp-codeStreamStart );
+        assert(fit32(blockStartIp-codeStreamStart));
+        bb->setCodeOffset( (uint32)(blockStartIp-codeStreamStart) );
         for (Inst* inst = (Inst*)bb->getFirstInst(); inst!=NULL; inst = inst->getNextInst()) {
             if( inst->hasKind(Inst::Kind_PseudoInst)) {
                 
                 uint8 * instStartIp = ip;
-                inst->setCodeOffset( instStartIp-blockStartIp );
+                inst->setCodeOffset( (uint32)(instStartIp-blockStartIp) );
                 continue;
             }
 
@@ -398,23 +401,25 @@
             {
                 if ((POINTER_SIZE_INT)ip & 0xF) 
                 {
-                    uint64 align = 0x10 - ((POINTER_SIZE_INT)ip & 0xF);
+                    unsigned align = 0x10 - (unsigned)((POINTER_SIZE_INT)ip & 0xF);
                     ip = (uint8*)EncoderBase::nops((char*)ip, align);
                 }
                 uint8 * instStartIp = ip;
-                inst->setCodeOffset( instStartIp-blockStartIp );
+                assert(fit32(instStartIp-blockStartIp));
+                inst->setCodeOffset( (uint32)(instStartIp-blockStartIp) );
                 ip = inst->emit(ip);
                 ip = (uint8*)EncoderBase::nops((char*)ip, 0x10 - inst->getCodeSize());
             } else {
 #endif
             uint8 * instStartIp = ip;
-            inst->setCodeOffset( instStartIp-blockStartIp );
+            assert(fit32(instStartIp-blockStartIp));
+            inst->setCodeOffset( (uint32)(instStartIp-blockStartIp) );
             ip = inst->emit(ip);
 #ifdef _EM64T_
             }
 #endif
         }
-        bb->setCodeSize( ip-blockStartIp );
+        bb->setCodeSize( (uint32)(ip-blockStartIp) );
     }
     unsigned codeSize = (unsigned)(ip-codeStreamStart);
     assert( codeSize < maxMethodSize );
@@ -453,7 +458,7 @@
                     if (offset >= -128 && offset < 127 && inst->getOpnd(targetOpndIndex)->getSize() != OpndSize_8) {
                         inst->setOpnd(targetOpndIndex, irManager->newImmOpnd(irManager->getTypeFromTag(Type::Int8), offset));
                         uint8 * newInstCodeEndAddr = inst->emit(instCodeStartAddr);
-                        bb->setCodeSize(bb->getCodeSize() + (newInstCodeEndAddr - instCodeEndAddr));
+                        bb->setCodeSize(bb->getCodeSize() + (uint32)(newInstCodeEndAddr - instCodeEndAddr));
                         newOpndsCreated = true;
                     } 
                 }
@@ -510,8 +515,7 @@
                     int64 offset=targetCodeStartAddr-instCodeEndAddr;
 
 #ifdef _EM64T_
-#ifndef WIN32
-                    if (llabs(offset) > 0xFFFFFFFF) {
+                    if (!fit32(offset)) { // offset as a signed value does not fits into 32 bits
                         const RegName TMP_BASE = RegName_R14;
                         EncoderBase::Operands args;
                         args.clear();
@@ -522,10 +526,6 @@
                         args.add(TMP_BASE);
                         EncoderBase::encode(ip, Mnemonic_CALL, args);
                     } else {
-#else
-                    // TODO: 
-                    assert(0);
-#endif
 #endif
                     inst->getOpnd(targetOpndIndex)->assignImmValue((int64)offset);
                     // re-emit the instruction: 
@@ -535,10 +535,8 @@
                         registerDirectCall(inst);
                     }
 #ifdef _EM64T_
-#ifndef WIN32
                     }
 #endif
-#endif
                 }   
             // todo64
                     if (isBcRequired) {
@@ -581,7 +579,8 @@
     Byte ** indirectAddr = (Byte **)recompiledMethodDesc->getIndirectAddress();
     Byte * targetAddr = *indirectAddr;
     Byte * callAddr = (Byte*)data;
-    uint32 offset = targetAddr - callAddr-5;
+    assert(fit32(targetAddr - callAddr-5));
+    uint32 offset = (uint32)(targetAddr - callAddr-5);
 
     //FIXME
     //if (Log::cat_rt()->isDebugEnabled()) {
@@ -630,7 +629,7 @@
         registerExceptionRegion((void*)regionStart, (void*)regionEnd, regionDispatchNode);
     }
 
-    uint32 handlerInfoCount=exceptionHandlerInfos.size();
+    uint32 handlerInfoCount=(uint32)exceptionHandlerInfos.size();
     irManager->getCompilationInterface().setNumExceptionHandler(handlerInfoCount);
     for (uint32 i=0; i<handlerInfoCount; i++){
         const ExceptionHandlerInfo & info=exceptionHandlerInfos[i];
@@ -737,7 +736,7 @@
                 methInfo = new(memoryManager) CompiledMethodInfo(memoryManager,
                                                                  (POINTER_SIZE_INT)methMarkerInst->getCodeStartAddr(),
                                                                  oldMethodEntryInst,
-                                                                 inlineStack.size());
+                                                                 (uint32)inlineStack.size());
 
                 methodLocationMap[methMarkerInst] = methInfo;
             } else if (inst->getKind() == Inst::Kind_MethodEndPseudoInst) {

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32CodeLayoutBottomUp.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32CodeLayoutBottomUp.cpp?view=diff&rev=512698&r1=512697&r2=512698
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32CodeLayoutBottomUp.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32CodeLayoutBottomUp.cpp Wed Feb 28 02:56:15 2007
@@ -207,7 +207,7 @@
     assert(*chains.begin() ==irManager->getFlowGraph()->getEntryNode());
 
     assert(*chains.begin() == irManager->getFlowGraph()->getEntryNode());
-    for (uint32 i = 0, n = chains.size()-1; i<n;i++) {
+    for (uint32 i = 0, n = (uint32)chains.size()-1; i<n;i++) {
         BasicBlock* firstChain = chains[i];
         BasicBlock* secondChain= chains[i+1];
         BasicBlock* lastInFirst = firstChain;

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32ConstraintsResolver.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32ConstraintsResolver.cpp?view=diff&rev=512698&r1=512697&r2=512698
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32ConstraintsResolver.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32ConstraintsResolver.cpp Wed Feb 28 02:56:15 2007
@@ -384,7 +384,7 @@
         if (node->isBlockNode()){
             double bbecv = getBasicBlockPriority(node);
             uint32 ibb=0;
-            for (uint32 nbb=basicBlocks.size(); ibb<nbb; ++ibb){
+            for (uint32 nbb=(uint32)basicBlocks.size(); ibb<nbb; ++ibb){
                 if (bbecv > getBasicBlockPriority(basicBlocks[ibb]))
                     break;
             }
@@ -671,7 +671,7 @@
 void ConstraintsResolverImpl::resolveConstraints()
 {   
     // for all basic blocks in the array
-    for (uint32 ibb=0, nbb=basicBlocks.size(); ibb<nbb; ++ibb){
+    for (uint32 ibb=0, nbb=(uint32)basicBlocks.size(); ibb<nbb; ++ibb){
         resolveConstraints(basicBlocks[ibb]);
     }
 }   

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32GCMap.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32GCMap.cpp?view=diff&rev=512698&r1=512697&r2=512698
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32GCMap.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32GCMap.cpp Wed Feb 28 02:56:15 2007
@@ -133,9 +133,10 @@
         } else if (opnd->getMemOpndKind() == MemOpndKind_StackAutoLayout) {
             const Opnd* displOpnd = opnd->getMemOpndSubOpnd(MemOpndSubOpndKind_Displacement);
             assert(displOpnd!=NULL);
+            assert(fit32(displOpnd->getImmValue()) && fit32(inst->getStackDepth()));
             int offset_from_esp0 =  (int)displOpnd->getImmValue(); //opnd saving offset from the esp on method call
             int inst_offset_from_esp0 = (int)inst->getStackDepth();
-            POINTER_SIZE_INT ptrToAddrOffset = inst_offset_from_esp0 + offset_from_esp0; //opnd saving offset from the esp on inst
+            int ptrToAddrOffset = inst_offset_from_esp0 + offset_from_esp0; //opnd saving offset from the esp on inst
             gcOpnd = new (mm) GCSafePointOpnd(isObject, false, ptrToAddrOffset, offset);
         } else {
             assert(opnd->getMemOpndKind() == MemOpndKind_Heap);
@@ -185,8 +186,8 @@
 POINTER_SIZE_INT GCMap::getByteSize() const {
     POINTER_SIZE_INT slotSize = sizeof(POINTER_SIZE_INT);
     POINTER_SIZE_INT size = slotSize/*byte number */ + slotSize/*number of safepoints*/ 
-            + slotSize*gcSafePoints.size()/*space to save safepoints sizes*/;
-    for (int i=0, n = gcSafePoints.size(); i<n;i++) {
+            + (POINTER_SIZE_INT)slotSize*gcSafePoints.size()/*space to save safepoints sizes*/;
+    for (int i=0, n = (int)gcSafePoints.size(); i<n;i++) {
         GCSafePoint* gcSite = gcSafePoints[i];
         size+= slotSize*gcSite->getUint32Size();
     }
@@ -216,7 +217,7 @@
 void GCMap::write(Byte* output)  {
     POINTER_SIZE_INT* data = (POINTER_SIZE_INT*)output;
     data[0] = getByteSize();
-    data[1] = gcSafePoints.size();
+    data[1] = (POINTER_SIZE_INT)gcSafePoints.size();
     POINTER_SIZE_INT offs = 2;
 
 #ifdef GCMAP_TRACK_IDS
@@ -226,7 +227,7 @@
     std::sort(gcSafePoints.begin(), gcSafePoints.end(), hwecompare());
 #endif
 
-    for (int i=0, n = gcSafePoints.size(); i<n;i++) {
+    for (int i=0, n = (int)gcSafePoints.size(); i<n;i++) {
         GCSafePoint* gcSite = gcSafePoints[i];
         POINTER_SIZE_INT siteUint32Size = gcSite->getUint32Size();
         data[offs++] = siteUint32Size;
@@ -261,9 +262,9 @@
     gcOpnds.reserve(nOpnds);
     POINTER_SIZE_INT offs = 2;
     for (uint32 i = 0; i< nOpnds; i++, offs+=3) {
-        GCSafePointOpnd* gcOpnd= new (mm) GCSafePointOpnd(image[offs], int(image[offs+1]), int32(image[offs+2]));
+        GCSafePointOpnd* gcOpnd= new (mm) GCSafePointOpnd(uint32(image[offs]), int(image[offs+1]), int32(image[offs+2]));
 #ifdef GCMAP_TRACK_IDS
-        gcOpnd->firstId = image[offs+3];
+        gcOpnd->firstId = uint32(image[offs+3]);
         offs++;
 #endif
         gcOpnds.push_back(gcOpnd);
@@ -275,7 +276,7 @@
 }
 
 POINTER_SIZE_INT GCSafePoint::getUint32Size() const {
-    POINTER_SIZE_INT size = 1/*ip*/+1/*nOpnds*/+GCSafePointOpnd::IMAGE_SIZE_UINT32 * gcOpnds.size()/*opnds images*/;
+    POINTER_SIZE_INT size = 1/*ip*/+1/*nOpnds*/+GCSafePointOpnd::IMAGE_SIZE_UINT32 * (POINTER_SIZE_INT)gcOpnds.size()/*opnds images*/;
 #ifdef GCMAP_TRACK_IDS
     size++; //instId
     size++; //hardwareExceptionPoint
@@ -286,8 +287,8 @@
 void GCSafePoint::write(POINTER_SIZE_INT* data) const {
     POINTER_SIZE_INT offs=0;
     data[offs++] = ip;
-    data[offs++] = gcOpnds.size();
-    for (uint32 i = 0, n = gcOpnds.size(); i<n; i++, offs+=3) {
+    data[offs++] = (POINTER_SIZE_INT)gcOpnds.size();
+    for (uint32 i = 0, n = (uint32)gcOpnds.size(); i<n; i++, offs+=3) {
         GCSafePointOpnd* gcOpnd = gcOpnds[i];
         data[offs] = gcOpnd->flags;
         data[offs+1] = gcOpnd->val;
@@ -312,17 +313,11 @@
 #ifdef GCMAP_TRACK_IDS
     assert(cond);
 #else
-#if defined(WIN32) && !defined(_EM64T_)
+#ifdef _WIN32 // any windows
     if (!cond) {
-        __asm {
-            int 3;
-        }
+        DebugBreak();
     }
 #endif
-#if defined (_EM64T_) && defined(_WIN64)
-    // TODO: add proper code
-    assert(0);
-#endif
 #endif    
 }
 
@@ -349,7 +344,7 @@
     //In this case it's impossible to derive valid base for mptr with unknown offset.
 
     //1. Derive all offsets. Use GCSafePointOpnd.mptrOffset to store the result.
-    for (uint32 i=0, n = gcOpnds.size(); i<n; i++) {
+    for (uint32 i=0, n = (uint32)gcOpnds.size(); i<n; i++) {
         GCSafePointOpnd* gcOpnd = gcOpnds[i];
         POINTER_SIZE_INT valPtrAddr = getOpndSaveAddr(context, stackInfo, gcOpnd);
         if (gcOpnd->isObject() || gcOpnd->getMPtrOffset()!=MPTR_OFFSET_UNKNOWN) {
@@ -389,7 +384,7 @@
     }
 
     //2. Report the results
-    for (uint32 i=0, n = gcOpnds.size(); i<n; i++) {
+    for (uint32 i=0, n = (uint32)gcOpnds.size(); i<n; i++) {
         GCSafePointOpnd* gcOpnd = gcOpnds[i];
         POINTER_SIZE_INT valPtrAddr = getOpndSaveAddr(context, stackInfo, gcOpnd);
         if (gcOpnd->isObject()) {
@@ -424,7 +419,7 @@
     } else { 
         assert(gcOpnd->isOnStack());
 #ifdef _EM64T_
-        addr = ctx->rsp + gcOpnd->getDistFromInstESP();
+        addr = ctx->rsp + (POINTER_SIZE_INT)gcOpnd->getDistFromInstESP();
 #else
         addr = ctx->esp + gcOpnd->getDistFromInstESP();
 #endif
@@ -464,7 +459,7 @@
 */
 
     // Compute stack information
-    uint32 stackInfoSize = StackInfo::getByteSize(methodDesc);
+    uint32 stackInfoSize = (uint32)StackInfo::getByteSize(methodDesc);
     Byte* infoBlock = methodDesc->getInfoBlock();
     Byte* gcBlock = infoBlock + stackInfoSize;
 #ifdef _EM64T_
@@ -516,10 +511,10 @@
         inlineInfo->write(compIntf.allocateJITDataBlock(inlineInfo->computeSize(), 8));
     }
 
-    uint32 stackInfoSize = stackInfo->getByteSize();
-    uint32 gcInfoSize = gcMap->getByteSize();
-    uint32 bcMapSize = bcMap->getByteSize(); // we should write at least the size of map  in the info block
-    assert(bcMapSize >= sizeof(POINTER_SIZE_INT));               // so  bcMapSize should be more than 4 for ia32
+    uint32 stackInfoSize = (uint32)stackInfo->getByteSize();
+    uint32 gcInfoSize = (uint32)gcMap->getByteSize();
+    uint32 bcMapSize = (uint32)bcMap->getByteSize(); // we should write at least the size of map  in the info block
+    assert(bcMapSize >= sizeof(POINTER_SIZE_INT));   // so  bcMapSize should be more than 4 for ia32
 
     Byte* infoBlock = compIntf.allocateInfoBlock(stackInfoSize + gcInfoSize + bcMapSize);
     stackInfo->write(infoBlock);

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32GCMap.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32GCMap.h?view=diff&rev=512698&r1=512697&r2=512698
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32GCMap.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32GCMap.h Wed Feb 28 02:56:15 2007
@@ -85,7 +85,7 @@
 
         POINTER_SIZE_INT getUint32Size() const;
         void write(POINTER_SIZE_INT* image) const;
-        uint32 getNumOpnds() const {return gcOpnds.size();}
+        uint32 getNumOpnds() const {return (uint32)gcOpnds.size();}
         static POINTER_SIZE_INT getIP(const POINTER_SIZE_INT* image);
 
         void enumerate(GCInterface* gcInterface, const JitFrameContext* c, const StackInfo& stackInfo) const;

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?view=diff&rev=512698&r1=512697&r2=512698
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32GCSafePoints.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32GCSafePoints.cpp Wed Feb 28 02:56:15 2007
@@ -50,7 +50,7 @@
 // WARN: elements order could be changed!
 static void removeElementAt(GCSafePointPairs& pairs, uint32 idx) {
     assert(!pairs.empty());
-    uint32 newSize = pairs.size() - 1;
+    uint32 newSize = (uint32)pairs.size() - 1;
     assert(idx<=newSize);
     if (idx < newSize) {
         pairs[idx] = pairs[newSize];
@@ -63,7 +63,7 @@
 #ifdef _DEBUG_
     uint32 nPairs = 0;
 #endif 
-    for (int i = pairs.size(); --i>=0;) {
+    for (int i = (int)pairs.size(); --i>=0;) {
         MPtrPair& p = pairs[i];
         if (p.mptr == mptr) {
             removeElementAt(pairs, i);
@@ -341,7 +341,7 @@
     if (!pairs.empty()) {
         const BitSet* livenessFilter = findLivenessFilter(inst);
         if (livenessFilter!=NULL) {
-            for (int i = pairs.size(); --i>=0;) {
+            for (int i = (int)pairs.size(); --i>=0;) {
                 MPtrPair& p = pairs[i];
                 if (!livenessFilter->getBit(p.mptr->getId())) {
                     removeElementAt(pairs, i);
@@ -562,7 +562,7 @@
     bool needToFilterDeadPairs = false;
     uint32 instsAddedBefore = instsAdded;
     std::sort(res.begin(), res.end());
-    for (uint32 i=0, n = res.size(); i < n; i++) {
+    for (uint32 i=0, n = (uint32)res.size(); i < n; i++) {
         MPtrPair& p1 = res[i];
         Opnd* newBase = NULL; //new base opnd to merge ambiguos mptrs
         while (i+1 < n) {
@@ -660,7 +660,7 @@
                 GCSafePointPairs& pairs  = *pairsByGCSafePointInstId[inst->getId()];
                 if (!pairs.empty()) {
                     nSafePointsTmp--;
-                    for (int i =pairs.size(); --i>=0;) {
+                    for (int i = (int)pairs.size(); --i>=0;) {
                         MPtrPair& p = pairs[i];
                         if (!ls.getBit(p.mptr->getId())) {
                             removeElementAt(pairs, i);
@@ -702,7 +702,7 @@
                 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 = pairs1.size();i1<n1; i1++) {
+                for (uint32 i1 = 0, n1 = (uint32)pairs1.size();i1<n1; i1++) {
                     const MPtrPair& p1 = pairs1[i1];
                     if (ls->getBit(p1.mptr->getId())) {
                         for (uint32 i2 = 0; ; i2++) {
@@ -715,7 +715,7 @@
                     }
                 }
                 // and vice versa
-                for (uint32 i2 = 0, n2 = pairs2.size();i2<n2; i2++) {
+                for (uint32 i2 = 0, n2 = (uint32)pairs2.size();i2<n2; i2++) {
                     const MPtrPair& p2 = pairs2[i2];
                     if (ls->getBit(p2.mptr->getId())) {
                         for (uint32 i1 = 0; ; i1++) {

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?view=diff&rev=512698&r1=512697&r2=512698
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRManager.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRManager.cpp Wed Feb 28 02:56:15 2007
@@ -51,7 +51,7 @@
 {
     assert(str!=NULL);
     if (length==EmptyUint32)
-        length=strlen(str);
+        length=(uint32)strlen(str);
     char * psz=new(mm) char[length+1];
     strncpy(psz, str, length);
     psz[length]=0;
@@ -82,7 +82,7 @@
 { 
     assert(opnd->id>=opnds.size());
     opnds.push_back(opnd);
-    opnd->id=opnds.size()-1;
+    opnd->id=(uint32)opnds.size()-1;
 }
 
 //_____________________________________________________________________________________________
@@ -152,7 +152,7 @@
     if (str==NULL)
         str="";
     return new(memoryManager) ConstantAreaItem(
-        ConstantAreaItem::Kind_InternalStringConstantAreaItem, strlen(str)+1, 
+        ConstantAreaItem::Kind_InternalStringConstantAreaItem, (uint32)strlen(str)+1, 
         (void*)newInternalString(str)
     );
 }
@@ -638,15 +638,15 @@
         assert(opnd->getType()->isObject() || opnd->getType()->isManagedPtr());
     }
 #endif
-    GCInfoPseudoInst* inst = new(memoryManager, basesAndMptrs.size()) GCInfoPseudoInst(this, instId++);
+    GCInfoPseudoInst* inst = new(memoryManager, (uint32)basesAndMptrs.size()) GCInfoPseudoInst(this, instId++);
     Opnd ** opnds = inst->getOpnds();
     Constraint * constraints = inst->getConstraints();
-    for (uint32 i = 0, n = basesAndMptrs.size(); i < n; i++){
+    for (uint32 i = 0, n = (uint32)basesAndMptrs.size(); i < n; i++){
         Opnd * opnd = basesAndMptrs[i];
         opnds[i] = opnd;
         constraints[i] = Constraint(OpndKind_Any, opnd->getSize());
     }
-    inst->opndCount = basesAndMptrs.size();
+    inst->opndCount = (uint32)basesAndMptrs.size();
     inst->assignOpcodeGroup(this);
     return inst;
 }
@@ -1391,7 +1391,7 @@
 uint32 IRManager::calculateOpndStatistics(bool reindex)
 {
     POpnd * arr=&opnds.front();
-    for (uint32 i=0, n=opnds.size(); i<n; i++){
+    for (uint32 i=0, n=(uint32)opnds.size(); i<n; i++){
         Opnd * opnd=arr[i];
         if (opnd==NULL) {
             continue;
@@ -1443,7 +1443,7 @@
 
     uint32 maxIndex=calculateOpndStatistics(true);
 
-    uint32 opndsBefore=opnds.size();
+    uint32 opndsBefore=(uint32)opnds.size();
     opnds.resize(opnds.size()+maxIndex);
     POpnd * arr=&opnds.front();
     for (uint32 i=0; i<opndsBefore; i++){
@@ -1668,7 +1668,7 @@
                     Opnd * const * opnds = callInst->getOpnds();
 #ifdef _EM64T_
                     unsigned sz = 0;
-                    for (uint32 i=0, n=stackOpndInfos.size(); i<n; i++) {
+                    for (uint32 i=0, n=(uint32)stackOpndInfos.size(); i<n; i++) {
                         sz += sizeof(POINTER_SIZE_INT); 
                     }
                     if(sz&15) {
@@ -1678,7 +1678,7 @@
                     }
                     sz = 0;
 #endif
-                    for (uint32 i=0, n=stackOpndInfos.size(); i<n; i++) {
+                    for (uint32 i=0, n=(uint32)stackOpndInfos.size(); i<n; i++) {
 #ifdef _EM64T_
                         uint32 index = callInst->getCallingConventionClient().getCallingConvention()->pushLastToFirst()?i:n-1-i;
                         Inst * pushInst=newCopyPseudoInst(Mnemonic_PUSH, opnds[stackOpndInfos[index].opndIndex]);
@@ -1954,7 +1954,7 @@
             /** The value of the operand is the address where the interned version of the string is stored*/
             {
             MethodDesc*  mDesc = (MethodDesc*)info->getValue(0);
-            POINTER_SIZE_INT token = (POINTER_SIZE_INT)info->getValue(1);
+            uint32 token = (uint32)(POINTER_SIZE_INT)info->getValue(1);
             value = (POINTER_SIZE_INT) compilationInterface.loadStringObject(mDesc,token);
             }break;
         case Opnd::RuntimeInfo::Kind_StaticFieldAddress:

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?view=diff&rev=512698&r1=512697&r2=512698
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRManager.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRManager.h Wed Feb 28 02:56:15 2007
@@ -400,7 +400,7 @@
         are no longer in the LIR.
     */
     uint32 getOpndCount()const
-    { return opnds.size(); }
+    { return (uint32)opnds.size(); }
 
     /** returns an operand from the internal array of all operands by its ID. */
     Opnd * getOpnd(uint32 id)const

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32Inst.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32Inst.cpp?view=diff&rev=512698&r1=512697&r2=512698
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32Inst.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32Inst.cpp Wed Feb 28 02:56:15 2007
@@ -418,7 +418,7 @@
         assert(form==Form_Native);
         instEnd = Encoder::emit(stream, this);
     }
-    setCodeSize(instEnd - stream);
+    setCodeSize((uint32)(instEnd - stream));
     return instEnd;
 }
 
@@ -799,12 +799,12 @@
 {
     assert(callingConvention!=NULL);
     StlVector<CallingConvention::OpndInfo> & infos = getInfos(role);
-    callingConvention->getOpndInfo(argKind, infos.size(), &infos.front());
+    callingConvention->getOpndInfo(argKind, (uint32)infos.size(), &infos.front());
     bool lastToFirst=callingConvention->pushLastToFirst();
     uint32 slotNumber=0;
     for (
-        uint32 i=lastToFirst?0:infos.size()-1, 
-        end=lastToFirst?infos.size():(uint32)-1, 
+        uint32 i=lastToFirst?0:(uint32)infos.size()-1, 
+        end=lastToFirst?(uint32)infos.size():(uint32)-1, 
         inc=lastToFirst?1:-1;
         i!=end;
         i+=inc
@@ -827,7 +827,7 @@
     uint32 regArgCount=0, stackArgCount=0;
     Inst::Opnds opnds(ownerInst, Inst::OpndRole_Auxilary|role);
     Inst::Opnds::iterator handledOpnds=opnds.begin();
-    for (uint32 i=0, n=infos.size(); i<n; i++){
+    for (uint32 i=0, n=(uint32)infos.size(); i<n; i++){
         const CallingConvention::OpndInfo& info=infos[i];
 #ifdef _DEBUG
         bool eachSlotRequiresOpnd=false;

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InternalProfiler.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InternalProfiler.cpp?view=diff&rev=512698&r1=512697&r2=512698
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InternalProfiler.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InternalProfiler.cpp Wed Feb 28 02:56:15 2007
@@ -279,10 +279,10 @@
                 } else if (line.find("Counter.") == 0) {
                     if(!opened) {
                         opened = true;
-                        num = config->counters.size();
+                        num = (int)config->counters.size();
                         config->counters.push_back(Counter());
-                        int pos1 = line.find(".");
-                        int pos2 = line.find_first_of(".=" , pos1+1);
+                        int pos1 = (int)line.find(".");
+                        int pos2 = (int)line.find_first_of(".=" , pos1+1);
 
                         config->counters[num].name =    line.substr(pos1+1, pos2-pos1-1);
                     }
@@ -623,7 +623,7 @@
     InternalProfilerAct& storage = *static_cast<InternalProfilerAct*>(getAction());
     storage.statistics->push_back(ms);
     //method external properties, no need to count
-    uint32 cSize = storage.config->counters.size();
+    uint32 cSize = (uint32)storage.config->counters.size();
     if (!cSize)
         return;
     ms->bbStats[-1].counters= new(mm) uint32[cSize];

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InternalTrace.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InternalTrace.cpp?view=diff&rev=512698&r1=512697&r2=512698
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InternalTrace.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InternalTrace.cpp Wed Feb 28 02:56:15 2007
@@ -41,18 +41,11 @@
 #ifdef _DEBUG
         assert(cond);
 #else
-#ifdef WIN32
-#ifndef _EM64T_
-        if (!cond) {
-            __asm {
-                int 3;
-            }
+    #ifdef _WIN32 // any windows
+        if(!cond) {
+            DebugBreak();
         }
-#else
-    // TODO: add proper code
-    assert(0);
-#endif
-#endif
+    #endif
 #endif    
     }
 
@@ -146,7 +139,7 @@
         EntryPointPseudoInst * entryPointPseudoInst = (EntryPointPseudoInst *)inst;
         entryPointPseudoInst->getCallingConventionClient().finalizeInfos(Inst::OpndRole_Def, CallingConvention::ArgKind_InArg);
         const StlVector<CallingConvention::OpndInfo> & infos=((const EntryPointPseudoInst *)entryPointPseudoInst)->getCallingConventionClient().getInfos(Inst::OpndRole_Def);
-        Opnd * argInfoOpnd=irManager->newBinaryConstantImmOpnd(infos.size()*sizeof(CallingConvention::OpndInfo), &infos.front());
+        Opnd * argInfoOpnd=irManager->newBinaryConstantImmOpnd((uint32)infos.size()*sizeof(CallingConvention::OpndInfo), &infos.front());
         Opnd * args[3]={ methodNameOpnd, 
             irManager->newImmOpnd(irManager->getTypeManager().getInt32Type(), infos.size()), 
             argInfoOpnd,

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32Printer.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32Printer.cpp?view=diff&rev=512698&r1=512697&r2=512698
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32Printer.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32Printer.cpp Wed Feb 28 02:56:15 2007
@@ -24,6 +24,7 @@
 #include "../../vm/drl/DrlVMInterface.h"
 #include "../../shared/PlatformDependant.h"
 #include "CGSupport.h"
+#include "PlatformDependant.h"
 
 namespace Jitrino
 {
@@ -364,7 +365,7 @@
         os<<"[phase:"<<gcInst->desc<<"]";
         os<<"(";
         assert(!offsets.empty());
-        for (uint32 i = 0, n = offsets.size(); i<n; i++) {
+        for (uint32 i = 0, n = (uint32)offsets.size(); i<n; i++) {
                 int32 offset = offsets[i];
                 Opnd* opnd = uses[i];
                 if (i>0) {
@@ -1107,7 +1108,7 @@
 {
     char * retStr=NULL;
     uint32 si=0;
-    for (uint32 i=0, n=opnds.size(); i<n; i++){
+    for (uint32 i=0, n=(uint32)opnds.size(); i<n; i++){
         Opnd * o=opnds[i];
         if (o->isPlacedIn(c)){
             retStr=str;
@@ -1218,7 +1219,7 @@
             }
 
             out << "|\\" << std::endl;
-            for (uint32 i=0, n=opndsAll.size(); i<n; i++){
+            for (uint32 i=0, n=(uint32)opndsAll.size(); i<n; i++){
                 out<<opndsAll[i]->getFirstId()<<'_';
             }
             out << "\\l\\" << std::endl;
@@ -1228,7 +1229,7 @@
                     out << regStrings[i] << "\\l\\" << ::std::endl;
             }
 
-            uint32 idx=liveSets.size()-1;
+            uint32 idx=(uint32)liveSets.size()-1;
 
             for (Inst * inst = (Inst*)bb->getFirstInst(); inst != NULL; inst = inst->getNextInst(), idx--) {
                 printLivenessForInst(opndsAll, liveSets[idx], liveSets[idx-1]); // output at entry
@@ -1274,7 +1275,7 @@
 void IRLivenessDotPrinter::printLivenessForInst(const StlVector<Opnd*> opnds, const BitSet * ls0, const BitSet * ls1)
 {
     ::std::ostream& out=getStream();
-    for (uint32 i=0, n=opnds.size(); i<n; i++){
+    for (uint32 i=0, n=(uint32)opnds.size(); i<n; i++){
         Opnd * opnd=opnds[i];
         bool isLiveBefore=ls0!=NULL && ls0->getBit(opnd->getId());
         bool isLiveAfter=ls1!=NULL && ls1->getBit(opnd->getId());

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32RegAlloc2.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32RegAlloc2.cpp?view=diff&rev=512698&r1=512697&r2=512698
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32RegAlloc2.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32RegAlloc2.cpp Wed Feb 28 02:56:15 2007
@@ -235,7 +235,7 @@
         beg = spans.front().beg,
         end = spans.back().end;
         length=0;
-        for (int i=0, n=spans.size(); i<n; i++){
+        for (int i=0, n=(int)spans.size(); i<n; i++){
             assert(pspans[i].beg != 0);
             length += pspans[i].end - pspans[i].beg; // no +1 as this is the number of instructions "hovered" by this opand
 #ifdef _DEBUG
@@ -281,13 +281,13 @@
     adj = 0;
 
     int d;
-    if ( (d = x->end - beg) < 0 ){
+    if ( (d = int(x->end - beg)) < 0 ){
         if (d==-1)
             adj=1;
         DBGOUT(" -free (below lower bound)!" << endl;)
         return true;
     }
-    if ( (d = x->beg - end) > 0 ){
+    if ( (d = int(x->beg - end)) > 0 ){
         if (d==1)
             adj=1;
         DBGOUT(" -free (above upper bound)!" << endl;)
@@ -533,7 +533,7 @@
 
     //irManager->indexInsts();
 
-    BitSet lives(mm, opandcount);
+    BitSet lives(mm, (uint32)opandcount);
 
     const Nodes& nodes = irManager->getFlowGraph()->getNodesPostOrder();
     for (Nodes::const_iterator it = nodes.begin(), end = nodes.end(); it!=end; ++it) {

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32RegAlloc3.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32RegAlloc3.cpp?view=diff&rev=512698&r1=512697&r2=512698
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32RegAlloc3.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32RegAlloc3.cpp Wed Feb 28 02:56:15 2007
@@ -395,7 +395,7 @@
         indexes[i] = -1;
 
     for (size_t i = 0; i != size(); ++i)
-        indexes[operator[](i).getKind()] = i;
+        indexes[operator[](i).getKind()] = (int)i;
 }
 
 
@@ -409,7 +409,7 @@
             if (r.getKind() == c.getKind())
             {
                 r.setMask(r.getMask() | c.getMask());
-                return i;
+                return (int)i;
             }
         }
 
@@ -588,7 +588,7 @@
 
     for (size_t i = 0; i != opandcount; ++i)
     {
-        Opnd* opnd  = getIRManager().getOpnd(i);
+        Opnd* opnd  = getIRManager().getOpnd((uint32)i);
         int mapto = -1;
 
         int ridx;
@@ -613,7 +613,7 @@
                 opndx.ridx  = ridx;
                 opndx.alloc = 0;
                 opndx.avail = loc.getMask() & registers[ridx].getMask();
-                opndx.nbavails = bitCount(opndx.avail);
+                opndx.nbavails = (int)bitCount(opndx.avail);
                 assert(opndx.nbavails != 0);
                 opndx.spillcost = 1;
                 opndx.spilled = false;
@@ -641,7 +641,7 @@
 
     BoolMatrix matrix(mm, graphsize);
 
-    BitSet lives(mm, opandcount);
+    BitSet lives(mm, (uint32)opandcount);
 
     const Nodes& nodes = irManager->getFlowGraph()->getNodesPostOrder();
     for (Nodes::const_iterator it = nodes.begin(), end = nodes.end(); it!=end; ++it) {
@@ -1007,7 +1007,7 @@
         opndx.alloc = findHighest(alloc);
         opndx.opnd->assignRegName(getRegName((OpndKind)registers[opndx.ridx].getKind(), 
                                              opndx.opnd->getSize(), 
-                                             bitNumber(opndx.alloc)));
+                                             (int)bitNumber(opndx.alloc)));
 
         ++count_assigned;
         DBGOUT("assigned (" << x << ") = <" << getRegNameString(opndx.opnd->getRegName()) << ">" << endl;)

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32RegAllocCheck.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32RegAllocCheck.cpp?view=diff&rev=512698&r1=512697&r2=512698
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32RegAllocCheck.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32RegAllocCheck.cpp Wed Feb 28 02:56:15 2007
@@ -98,7 +98,7 @@
 
 static RegName regName (int x)
 {
-    size_t k = x / IRMaxRegNamesSameKind;
+    uint32 k = x / IRMaxRegNamesSameKind;
     return getRegName((OpndKind)k, Constraint::getDefaultSize(k), x % IRMaxRegNamesSameKind);
 }
 
@@ -122,7 +122,7 @@
 {
     lastbb = 0;
 
-    BitSet lives(mm, opandcount);
+    BitSet lives(mm, (uint32)opandcount);
     irm.getLiveAtExit(bblock, lives);
 
     Opnd* regdefs[MaxRegs],
@@ -148,7 +148,7 @@
             else
                 if (regnxts[ridx] != opnd)
                 {
-                    error() << "at end of block," << regName(ridx) 
+                    error() << "at end of block," << regName((int)ridx) 
                             << " assigned to " << *regnxts[ridx] << " and " << *opnd << endl;
                 }
         }
@@ -175,7 +175,7 @@
                     else
                         if (regdefs[ridx] != opnd)
                         {
-                            error() << "  Invalid definitions at " << *inst << " " << regName(ridx) 
+                            error() << "  Invalid definitions at " << *inst << " " << regName((int)ridx) 
                                     << " of " << *regdefs[ridx] << " or " << *opnd << endl;
                         }
                 }
@@ -187,7 +187,7 @@
                     else
                         if (reguses[ridx] != opnd)
                         {
-                            error() << "  Invalid usages at " << *inst << " " << regName(ridx) 
+                            error() << "  Invalid usages at " << *inst << " " << regName((int)ridx) 
                                     << " of " << *reguses[ridx] << " or " << *opnd << endl;
                         }
                 }
@@ -203,7 +203,7 @@
                     if (regdefs[ridx] != regnxts[ridx])
                         if (regnxts[ridx] != 0)
                         {
-                            error() << "  " << *inst << " " << regName(ridx) 
+                            error() << "  " << *inst << " " << regName((int)ridx) 
                                     << " invalid usage of " << *regnxts[ridx]
                                     << " instead of " << *regdefs[ridx] << endl;
                         }
@@ -220,7 +220,7 @@
             {
                 if (reguses[ridx] != regnxts[ridx] && regnxts[ridx] != 0)
                 {
-                    error() << "  " << *inst << " " << regName(ridx) 
+                    error() << "  " << *inst << " " << regName((int)ridx) 
                             << " invalid usage of " << *reguses[ridx]
                             << " or " << *regnxts[ridx] << endl;
                 }
@@ -240,7 +240,7 @@
 {
     for (size_t i = 0; i != opandcount; ++i)
     {
-        Opnd* opnd = irm.getOpnd(i);
+        Opnd* opnd = irm.getOpnd((uint32)i);
         if (!opnd->hasAssignedPhysicalLocation())
         {
             header() << "Not assigned opand " << *opnd << endl;

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32RuntimeInterface.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32RuntimeInterface.cpp?view=diff&rev=512698&r1=512697&r2=512698
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32RuntimeInterface.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32RuntimeInterface.cpp Wed Feb 28 02:56:15 2007
@@ -75,8 +75,8 @@
     StackInfo stackInfo;
 
     Byte* infoBlock = method->getInfoBlock();
-    uint32 stackInfoSize = stackInfo.readByteSize(infoBlock);
-    uint32 gcMapSize = GCMap::readByteSize(infoBlock + stackInfoSize);
+    POINTER_SIZE_INT stackInfoSize = stackInfo.readByteSize(infoBlock);
+    POINTER_SIZE_INT gcMapSize = GCMap::readByteSize(infoBlock + stackInfoSize);
 
     const char* methName;
 
@@ -95,8 +95,8 @@
     StackInfo stackInfo;
 
     Byte* infoBlock = method->getInfoBlock();
-    uint32 stackInfoSize = stackInfo.readByteSize(infoBlock);
-    uint32 gcMapSize = GCMap::readByteSize(infoBlock + stackInfoSize);
+    POINTER_SIZE_INT stackInfoSize = stackInfo.readByteSize(infoBlock);
+    POINTER_SIZE_INT gcMapSize = GCMap::readByteSize(infoBlock + stackInfoSize);
 
     const char* methName;
 

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32SpillGen.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32SpillGen.cpp?view=diff&rev=512698&r1=512697&r2=512698
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32SpillGen.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32SpillGen.cpp Wed Feb 28 02:56:15 2007
@@ -410,7 +410,7 @@
         indexes[i] = -1;
 
     for (size_t i = 0; i != size(); ++i)
-        indexes[operator[](i).getKind()] = i;
+        indexes[operator[](i).getKind()] = (int)i;
 }
 
 
@@ -441,7 +441,7 @@
             if (r.getKind() == c.getKind())
             {
                 r.setMask(r.getMask() | c.getMask());
-                return i;
+                return (int)i;
             }
         }
 
@@ -585,7 +585,7 @@
     emitted = 0;
 
     opndcount = irManager->getOpndCount();
-    lives_exit = new (mm) BitSet(mm, opndcount); 
+    lives_exit = new (mm) BitSet(mm, (uint32)opndcount); 
 
     actsmap.resize(opndcount);
     for (size_t i = 0; i < opndcount; ++i)
@@ -602,7 +602,7 @@
             }
 
             lives_start = irManager->getLiveAtEntry(bblock);
-            lives_exit->resize(opndcount);
+            lives_exit->resize((uint32)opndcount);
             irManager->getLiveAtExit(bblock, *lives_exit);
 
             size_t bfails = 0;
@@ -635,7 +635,7 @@
                 {
                     size_t oldcount = opndcount;
                     opndcount = irManager->getOpndCount();
-                    lives_exit->resize(opndcount);
+                    lives_exit->resize((uint32)opndcount);
                     irManager->fixLivenessInfo();
 
                     actsmap.resize(opndcount);
@@ -888,7 +888,7 @@
         for (Oplines::iterator it = actives.begin(); it != actives.end(); ++it)
         {
             Opline& opline = *it;
-            opline.weight = bitCount(opline.initial.getMask());
+            opline.weight = (int)bitCount(opline.initial.getMask());
         }
         sort(actives.begin(), actives.end(), Opline::smaller);
     }
@@ -1632,7 +1632,7 @@
 
     return xbest == INT_MAX ? 
             RegName_Null : 
-            getRegName(static_cast<OpndKind>(c.getKind()), c.getSize(), xbest);
+            getRegName(static_cast<OpndKind>(c.getKind()), c.getSize(), (int)xbest);
 }
 
 
@@ -1805,7 +1805,7 @@
         for (ptrx = evict.endx+1; ptrx <  endx && isEvict(evict.opnd, ptrx); ++ptrx)
             evict.endx = ptrx;
 
-        evict.weight = evict.endx - evict.begx;
+        evict.weight = int(evict.endx - evict.begx);
 
         DBGOUT(" evict " << *evict.opnd << " [" << *evict.begx->inst 
                << " - " << *evict.endx->inst << "] w:" << evict.weight << endl;)

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32StackInfo.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32StackInfo.cpp?view=diff&rev=512698&r1=512697&r2=512698
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32StackInfo.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32StackInfo.cpp Wed Feb 28 02:56:15 2007
@@ -361,7 +361,7 @@
             }
         }
     }
-    hashTableSize = stackDepthInfo->size();
+    hashTableSize = (uint32)stackDepthInfo->size();
 }
 
 void StackInfo::setMethodExitString(IRManager& irm)

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32StackLayout.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32StackLayout.cpp?view=diff&rev=512698&r1=512697&r2=512698
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32StackLayout.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32StackLayout.cpp Wed Feb 28 02:56:15 2007
@@ -239,7 +239,7 @@
         const StlVector<CallingConventionClient::StackOpndInfo>& stackOpndInfos = 
             ((const EntryPointPseudoInst*)entryPointInst)->getCallingConventionClient().getStackOpndInfos(Inst::OpndRole_Def);
 
-        for (uint32 i=0, n=stackOpndInfos.size(); i<n; i++) {//assign displacements for input operands
+        for (uint32 i=0, n=(uint32)stackOpndInfos.size(); i<n; i++) {//assign displacements for input operands
 
             uint64 argOffset = 
 #ifdef _EM64T_

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32WebMaker.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32WebMaker.cpp?view=diff&rev=512698&r1=512697&r2=512698
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32WebMaker.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32WebMaker.cpp Wed Feb 28 02:56:15 2007
@@ -79,7 +79,7 @@
 
     struct Nodex
     {
-        Nodex (MemoryManager& mm, size_t s) :globentrys(mm,s), 
+        Nodex (MemoryManager& mm, size_t s) :globentrys(mm,(uint32)s), 
                                              globdefsp (0), 
                                              globkillsp(0),
                                              globexitsp(0) {}
@@ -212,12 +212,12 @@
     for (size_t i = 0; i != opandcount; ++i)
     {
         Opndx* opndxp = 0;
-        if (!irManager->getOpnd(i)->hasAssignedPhysicalLocation())
+        if (!irManager->getOpnd((uint32)i)->hasAssignedPhysicalLocation())
             opndxp = new Opndx(mm);
         opndxs[i] = opndxp;
     }
 
-    BitSet lives(mm, opandcount);
+    BitSet lives(mm, (uint32)opandcount);
     globcount = 0;
 
     const Nodes& postOrder = irManager->getFlowGraph()->getNodesPostOrder();
@@ -236,7 +236,7 @@
                     Opndx* opndxp = opndxs.at(opndp->getId());
                     if (opndxp != 0)
                     {
-                        const uint32 oprole = const_cast<const Inst*>(instp)->getOpndRoles(itx);
+                        const uint32 oprole = const_cast<const Inst*>(instp)->getOpndRoles((uint32)itx);
                         const bool isdef = ((oprole & Inst::OpndRole_UseDef) == Inst::OpndRole_Def)
                                         && ((iprops & Inst::Properties_Conditional) == 0 );
                         if (isdef)
@@ -264,7 +264,7 @@
                     OpDef& opdef = opndxp->opdefs.back();
                     if (opdef.defp->getNode() == nodep)
                     {
-                        opdef.globid = globcount++;
+                        opdef.globid = (int)globcount++;
                         bitsetp(opndxp->globdefsp)->setBit(opdef.globid, true);
                     }
                 }
@@ -327,7 +327,7 @@
 
     
     
-    BitSet wrkbs(mm, globcount);
+    BitSet wrkbs(mm, (uint32)globcount);
     bool   wrkbsvalid;
     size_t passnb = 0;
     const Nodes& postOrder = irManager->getFlowGraph()->getNodesPostOrder();
@@ -433,7 +433,7 @@
                     if (opndxp != 0)
                     {
                         OpDef* opdefp = 0;
-                        const uint32 oprole = const_cast<const Inst*>(instp)->getOpndRoles(itx);
+                        const uint32 oprole = const_cast<const Inst*>(instp)->getOpndRoles((uint32)itx);
                         const bool isdef = ((oprole & Inst::OpndRole_UseDef) == Inst::OpndRole_Def)
                                         && ((iprops & Inst::Properties_Conditional) == 0 );
                         DBGOUT(" O#" << opndp->getFirstId() << "(#" << opndp->getId() << ") def:" << isdef;)
@@ -527,7 +527,7 @@
     for (size_t i = 0; i != opandcount; ++i)
         if ((opndxp = opndxs[i]) != 0  && !opndxp->opdefs.empty())
         {
-            Opnd* opndp = irManager->getOpnd(i);
+            Opnd* opndp = irManager->getOpnd((uint32)i);
             Opndx::OpDefs& opdefs = opndxp->opdefs;
             DBGOUT(" O#" << opndp->getFirstId() << "(#" << i << ")" << endl;)
 
@@ -591,9 +591,9 @@
 BitSet* WebMaker::bitsetp (BitSet*& bsp)
 {
     if (bsp == 0)
-        bsp = new BitSet(mm, globcount);
+        bsp = new BitSet(mm, (uint32)globcount);
     else
-        bsp->resize(globcount);
+        bsp->resize((uint32)globcount);
     return bsp;
 }
 

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/dynopt/EdgeProfiler.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/dynopt/EdgeProfiler.cpp?view=diff&rev=512698&r1=512697&r2=512698
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/dynopt/EdgeProfiler.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/dynopt/EdgeProfiler.cpp Wed Feb 28 02:56:15 2007
@@ -87,7 +87,7 @@
         //compute edge-ids before CFG modification: edge-ids are part of CFG consistency check.
         for (Edges::const_iterator it = edgesToInstrument.begin(), end = edgesToInstrument.end(); it!=end; ++it) {
             Edge* edge = *it;
-            uint32 key = genKey(counterKeys.size() + 1, edge, bcLevelProfiling, debug);
+            uint32 key = genKey((uint32)counterKeys.size() + 1, edge, bcLevelProfiling, debug);
             assert( key != 0 );
             counterKeys.push_back(key);
         }
@@ -110,7 +110,7 @@
     
     ProfilingInterface* pi = irm.getProfilingInterface();
     if (!pi->hasMethodProfile(ProfileType_Edge, md, JITProfilingRole_GEN)) {
-        pi->createEdgeMethodProfile(mm , md,  counterKeys.size(),  (uint32*)&counterKeys.front(), _checkSum);
+        pi->createEdgeMethodProfile(mm , md,  (uint32)counterKeys.size(),  (uint32*)&counterKeys.front(), _checkSum);
     }
 
     irm.getCompilationInterface().unlockMethodData();

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/dynopt/StaticProfiler.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/dynopt/StaticProfiler.cpp?view=diff&rev=512698&r1=512697&r2=512698
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/dynopt/StaticProfiler.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/dynopt/StaticProfiler.cpp Wed Feb 28 02:56:15 2007
@@ -315,7 +315,7 @@
     Edge* falseEdge = c->node->getFalseEdge();
     Edge* trueEdge = c->node->getTrueEdge();
     double probLeft = 1.0;
-    uint32 edgesLeft = edges.size();
+    uint32 edgesLeft = (uint32)edges.size();
     if (falseEdge == NULL || trueEdge == NULL) { // can't apply general heuristics.
         Edge* uncondEdge = c->node->getUnconditionalEdge();
         if (uncondEdge) {

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/dynopt/ValueProfiler.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/dynopt/ValueProfiler.cpp?view=diff&rev=512698&r1=512697&r2=512698
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/dynopt/ValueProfiler.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/dynopt/ValueProfiler.cpp Wed Feb 28 02:56:15 2007
@@ -118,7 +118,7 @@
         }
     }
 
-    uint32 cc_size = counterKeys.size();
+    uint32 cc_size = (uint32)counterKeys.size();
     if (cc_size == 0) return;
 
     irm.getCompilationInterface().lockMethodData();

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_meth.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_meth.cpp?view=diff&rev=512698&r1=512697&r2=512698
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_meth.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_meth.cpp Wed Feb 28 02:56:15 2007
@@ -375,7 +375,7 @@
         if (is_set(DBG_TRACE_CG)) {dbg(";;>locals.gc_map\n");}
         Opnd reg(i32, valloc(i32));
         alu(alu_xor, reg, reg);
-        for (unsigned i=locals_map.size(); i<locals_gc_size; i++) {
+        for (unsigned i=(uint32)locals_map.size(); i<locals_gc_size; i++) {
             st4(reg.reg(), m_base, voff(m_stack.info_gc_locals()+i*sizeof(int)));
         }
     }

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.cpp?view=diff&rev=512698&r1=512697&r2=512698
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.cpp Wed Feb 28 02:56:15 2007
@@ -224,7 +224,7 @@
                 while(NULL != fgets(buf, sizeof(buf)-1, f)) {
                     // Skip comments
                     if (buf[0] == '#') continue;
-                    int len = strlen(buf);
+                    int len = (int)strlen(buf);
                     // Trim CRLF
                     if (len>=1 && buf[len-1]<=' ') { buf[len-1] = 0; }
                     if (len>=2 && buf[len-2]<=' ') { buf[len-2] = 0; }
@@ -298,7 +298,7 @@
 
     m_max_native_stack_depth = 0;
     m_bc = (unsigned char*)method_get_byte_code_addr(m_method);
-    unsigned bc_size = method_get_byte_code_size(m_method);
+    unsigned bc_size = (unsigned)method_get_byte_code_size(m_method);
     unsigned num_locals = method_vars_get_number(m_method);
     unsigned max_stack = method_get_max_stack(m_method);
     
@@ -312,7 +312,7 @@
     m_ra.resize(num_locals, ar_x);
     //
     
-    m_codeStream.init((size_t)(bc_size*NATIVE_CODE_SIZE_2_BC_SIZE_RATIO));
+    m_codeStream.init((unsigned)(bc_size*NATIVE_CODE_SIZE_2_BC_SIZE_RATIO));
     m_stack.init(num_locals, max_stack, num_input_slots);
     // We need to report 'this' additionally for the following cases:
     // - non-static sync methods - to allow VM to call monitor_exit() for
@@ -369,7 +369,7 @@
     comp_parse_bytecode();
     comp_alloc_regs();
     // Statistics:: number of basic blocks
-    STATS_MEASURE_MIN_MAX_VALUE(bbs, m_bbs.size(), meth_fname());
+    STATS_MEASURE_MIN_MAX_VALUE(bbs, (unsigned)m_bbs.size(), meth_fname());
 
     if (is_set(DBG_DUMP_BBS)) {
         dbg_dump_bbs();
@@ -378,7 +378,7 @@
     // Phase 2 - code generation.
     //
     SmartPtr<BBState> allStates;
-    allStates.alloc(m_bbs.size());
+    allStates.alloc((unsigned)m_bbs.size());
     unsigned c = 0;
     for (BBMAP::iterator i=m_bbs.begin(); i != m_bbs.end(); i++, c++) {
         m_bbStates[i->first] = &allStates[c];
@@ -1130,7 +1130,7 @@
 void Compiler::comp_set_ehandlers(void)
 {
     unsigned real_num_handlers = 0;
-    for (unsigned i=0, n=m_handlers.size(); i<n; i++) {
+    for (unsigned i=0, n=(unsigned)m_handlers.size(); i<n; i++) {
         HandlerInfo& hi = m_handlers[i];
         if (comp_hi_to_native(hi)) {
             ++real_num_handlers;
@@ -1145,7 +1145,7 @@
 
     method_set_num_target_handlers(m_method, m_hjit, real_num_handlers);
     
-    for (unsigned i=0, handlerID=0, n=m_handlers.size(); i<n; i++) {
+    for (unsigned i=0, handlerID=0, n=(unsigned)m_handlers.size(); i<n; i++) {
         const HandlerInfo& hi = m_handlers[i];
         if (hi.handler_ip == NULL) {
             continue;

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/csig.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/csig.cpp?view=diff&rev=512698&r1=512697&r2=512698
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/csig.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/csig.cpp Wed Feb 28 02:56:15 2007
@@ -38,7 +38,7 @@
     assert( !(m_cc&(CCONV_STACK_ALIGN16|CCONV_STACK_ALIGN_HALF16)) || 
             (m_cc&CCONV_CALLER_POPS));
     
-    unsigned num = m_args.size();
+    unsigned num = (unsigned)m_args.size();
     m_data.resize(num);
     unsigned fps = 0, gps = 0;
 

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/csig.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/csig.h?view=diff&rev=512698&r1=512697&r2=512698
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/csig.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/csig.h Wed Feb 28 02:56:15 2007
@@ -264,7 +264,7 @@
     unsigned count(void) const
     {
         assert(m_data.size() == m_args.size());
-        return m_args.size();
+        return (unsigned) m_args.size();
     }
     
     /**

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/enc.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/enc.cpp?view=diff&rev=512698&r1=512697&r2=512698
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/enc.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/enc.cpp Wed Feb 28 02:56:15 2007
@@ -53,13 +53,8 @@
 {
 #ifdef PLATFORM_POSIX
     raise(SIGTRAP);
-#elif !defined (_EM64T_)
-    __asm {
-        int 3
-    }
 #else
-    // TODO:
-    assert(0);
+    DebugBreak();
 #endif
 }
 

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/enc.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/enc.h?view=diff&rev=512698&r1=512697&r2=512698
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/enc.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/enc.h Wed Feb 28 02:56:15 2007
@@ -124,7 +124,8 @@
      */
     void    ip(char * _ip)
     {
-        m_size = _ip - m_buf;
+        assert((uint32)(_ip - m_buf) == (uint64)(_ip - m_buf));
+        m_size = (uint32)(_ip - m_buf);
         assert(m_size < total_size);
         // Need to be done here, and not in ip(void).
         // Otherwise, the following usage template:
@@ -1258,7 +1259,7 @@
      */
     unsigned patch_count(void) const
     {
-        return m_patches.size();
+        return (unsigned) m_patches.size();
     }
     /**
      * @brief Returns info about next patch record.

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/jdefs.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/jdefs.h?view=diff&rev=512698&r1=512697&r2=512698
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/jdefs.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/jdefs.h Wed Feb 28 02:56:15 2007
@@ -76,7 +76,11 @@
     #define snprintf    _snprintf
     #define vsnprintf    _vsnprintf
     #ifndef strcasecmp
-        #define strcasecmp  stricmp
+        #ifdef _MSC_VER
+            #define strcasecmp  _stricmp
+        #else
+            #define strcasecmp  stricmp
+        #endif
     #endif
 #else
     // stdcall has no meaning on platforms other than Lin32

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/rt.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/rt.cpp?view=diff&rev=512698&r1=512697&r2=512698
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/rt.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/rt.cpp Wed Feb 28 02:56:15 2007
@@ -46,10 +46,10 @@
 }
 
 static JitFrameContext* dummyCTX = NULL;
-static unsigned sp_off = (char*)devirt(sp, dummyCTX) - (char*)dummyCTX;
-static unsigned ip_off = (char*)devirt(gr_x, dummyCTX) - (char*)dummyCTX;
+static POINTER_SIZE_INT sp_off = (char*)devirt(sp, dummyCTX) - (char*)dummyCTX;
+static POINTER_SIZE_INT ip_off = (char*)devirt(gr_x, dummyCTX) - (char*)dummyCTX;
 
-static const unsigned bp_off = (char*)devirt(bp, dummyCTX) - (char*)dummyCTX;
+static const POINTER_SIZE_INT bp_off = (char*)devirt(bp, dummyCTX) - (char*)dummyCTX;
 static const unsigned bp_idx = ar_idx(bp);
 static const unsigned bp_bytes = word_no(bp_idx)*WORD_SIZE/CHAR_BIT;
 static const unsigned bp_mask  = 1<<bit_no(bp_idx);
@@ -137,7 +137,7 @@
     // the JitFrameContext. The good news is that the callee-save registers 
     // are also untouched yet, so we only need to restore SP and IP
     char * meth_start = infoBlock.get_code_start();
-    unsigned whereLen = where - meth_start;
+    unsigned whereLen = (unsigned)(where - meth_start);
     if (whereLen<infoBlock.get_warmup_len()) {
         *psp = sp_val + sframe.size();
         // Now, [sp] = retIP
@@ -284,7 +284,7 @@
     void *** pip = (void***)((char*)context + ip_off);
     char * where = (char*)**pip;
     char * meth_start = infoBlock.get_code_start();
-    unsigned whereLen = where - meth_start;
+    unsigned whereLen = (unsigned)(where - meth_start);
     if (whereLen<infoBlock.get_warmup_len()) {
         return;
     }
@@ -391,7 +391,7 @@
     void *** pip = (void***)((char*)context + ip_off);
     char * where = (char*)**pip;
     char * meth_start = infoBlock.get_code_start();
-    unsigned whereLen = where - meth_start;
+    unsigned whereLen = (unsigned)(where - meth_start);
     if (whereLen<infoBlock.get_warmup_len()) {
         return;
     }
@@ -426,7 +426,7 @@
     void *** pip = (void***)((char*)context + ip_off);
     char * where = (char*)**pip;
     char * meth_start = infoBlock.get_code_start();
-    unsigned whereLen = where - meth_start;
+    unsigned whereLen = (unsigned)(where - meth_start);
     if (whereLen<infoBlock.get_warmup_len()) {
         return NULL;
     }

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/main/PMF.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/main/PMF.cpp?view=diff&rev=512698&r1=512697&r2=512698
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/main/PMF.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/main/PMF.cpp Wed Feb 28 02:56:15 2007
@@ -932,7 +932,7 @@
 
 static int cmd_strength (bool jit_known, bool filter_known, size_t path_size)
 {
-    return ((1 + (filter_known ? 2 : 0) + (jit_known ? 4 : 0)) << 16) + path_size;
+    return int( ((1 + (filter_known ? 2 : 0) + (jit_known ? 4 : 0)) << 16) + path_size );
 }
 
 
@@ -1758,10 +1758,10 @@
                 continue;
 
             cmdp->log = true;
-            cmdp->xlog = i - leftbeg;
+            cmdp->xlog = int(i - leftbeg);
 
             int xpath = cmdp->xkeyword + 1,
-                xlast = cmdp->left->size() - 1;
+                xlast = (int)cmdp->left->size() - 1;
 
             if (cmdp->xlog == xlast)
             {// stream enable command
@@ -1787,7 +1787,7 @@
                     continue;
 
                 int xpath  = cmdp->xkeyword + 1,
-                    xlast  = cmdp->left->size() - 1,
+                    xlast  = (int)cmdp->left->size() - 1,
                     pathsz = cmdp->xlog - xpath;
 
                 Str& key = cmdp->left->at(xlast);



Mime
View raw message