Note: This website is archived. For up-to-date information about D projects and development, please visit wiki.dlang.org.

Changeset 834

Show
Ignore:
Timestamp:
01/01/11 22:12:24 (14 years ago)
Author:
walter
Message:

more 64

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/dmd-1.x/src/backend/cod4.c

    r828 r834  
    26622662            if (cx->Iop == 0x81 && (cx->Irm & modregrm(3,7,0)) == modregrm(3,4,0)) 
    26632663            { 
    26642664                // Convert AND of a word to AND of a dword, zeroing upper word 
    26652665                retregs = mask[cx->Irm & 7]; 
    26662666                cx->Iflags &= ~CFopsize; 
    26672667                cx->IEV2.Vint &= 0xFFFF; 
    26682668                goto L1; 
    26692669            } 
    26702670        } 
    26712671        if (op == OPs16_32 && retregs == mAX) 
    26722672            c2 = gen1(c2,0x98);         /* CWDE                         */ 
    26732673        else if (op == OPs32_64 && retregs == mAX) 
    26742674        {   c2 = gen1(c2,0x98);         /* CDQE                         */ 
    26752675            code_orrex(c2, REX_W); 
    26762676        } 
    26772677        else 
    26782678        { 
    26792679            reg = findreg(retregs); 
    26802680            if (config.flags4 & CFG4speed && op == OPu16_32) 
    26812681            {   // AND reg,0xFFFF 
    2682                 c3 = genc2(NULL,0x81,modregrm(3,4,reg),0xFFFFu); 
     2682                c3 = genc2(NULL,0x81,modregrmx(3,4,reg),0xFFFFu); 
    26832683            } 
    26842684            else 
    26852685            { 
    26862686                unsigned iop = (op == OPu16_32) ? 0x0FB7 : 0x0FBF; /* MOVZX/MOVSX reg,reg */ 
    26872687                c3 = genregs(CNIL,iop,reg,reg); 
    26882688            } 
    26892689            c2 = cat(c2,c3); 
    26902690        } 
    26912691     L1: 
    26922692        c3 = e1comsub ? getregs(retregs) : CNIL; 
    26932693    } 
    26942694    c4 = fixresult(e,retregs,pretregs); 
    26952695    c = cat4(c1,c2,c3,c4); 
    26962696  } 
    26972697  else if (*pretregs & mPSW || config.target_cpu < TARGET_80286) 
    26982698  { 
    26992699    // OPs16_32, OPs32_64 
    27002700    // CWD doesn't affect flags, so we can depend on the integer 
    27012701    // math to provide the flags. 
    27022702    retregs = mAX | mPSW;               // want integer result in AX 
  • trunk/src/backend/cod4.c

    r828 r834  
    26622662            if (cx->Iop == 0x81 && (cx->Irm & modregrm(3,7,0)) == modregrm(3,4,0)) 
    26632663            { 
    26642664                // Convert AND of a word to AND of a dword, zeroing upper word 
    26652665                retregs = mask[cx->Irm & 7]; 
    26662666                cx->Iflags &= ~CFopsize; 
    26672667                cx->IEV2.Vint &= 0xFFFF; 
    26682668                goto L1; 
    26692669            } 
    26702670        } 
    26712671        if (op == OPs16_32 && retregs == mAX) 
    26722672            c2 = gen1(c2,0x98);         /* CWDE                         */ 
    26732673        else if (op == OPs32_64 && retregs == mAX) 
    26742674        {   c2 = gen1(c2,0x98);         /* CDQE                         */ 
    26752675            code_orrex(c2, REX_W); 
    26762676        } 
    26772677        else 
    26782678        { 
    26792679            reg = findreg(retregs); 
    26802680            if (config.flags4 & CFG4speed && op == OPu16_32) 
    26812681            {   // AND reg,0xFFFF 
    2682                 c3 = genc2(NULL,0x81,modregrm(3,4,reg),0xFFFFu); 
     2682                c3 = genc2(NULL,0x81,modregrmx(3,4,reg),0xFFFFu); 
    26832683            } 
    26842684            else 
    26852685            { 
    26862686                unsigned iop = (op == OPu16_32) ? 0x0FB7 : 0x0FBF; /* MOVZX/MOVSX reg,reg */ 
    26872687                c3 = genregs(CNIL,iop,reg,reg); 
    26882688            } 
    26892689            c2 = cat(c2,c3); 
    26902690        } 
    26912691     L1: 
    26922692        c3 = e1comsub ? getregs(retregs) : CNIL; 
    26932693    } 
    26942694    c4 = fixresult(e,retregs,pretregs); 
    26952695    c = cat4(c1,c2,c3,c4); 
    26962696  } 
    26972697  else if (*pretregs & mPSW || config.target_cpu < TARGET_80286) 
    26982698  { 
    26992699    // OPs16_32, OPs32_64 
    27002700    // CWD doesn't affect flags, so we can depend on the integer 
    27012701    // math to provide the flags. 
    27022702    retregs = mAX | mPSW;               // want integer result in AX