Changeset 819
- Timestamp:
- 12/27/10 05:44:50 (14 years ago)
- Files:
-
- branches/dmd-1.x/src/backend/cod1.c (modified) (1 diff)
- trunk/src/backend/cod1.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/dmd-1.x/src/backend/cod1.c
r810 r819 639 639 { if (regcon.cse.value[i] == e && // if register has elem 640 640 /* watch out for a CWD destroying DX */ 641 641 !(i == DX && op == 0xF7 && desmsk & mDX)) 642 642 { 643 643 /* if ES, then it can only be a load */ 644 644 if (i == ES) 645 645 { if (op != 0x8B) 646 646 goto L1; /* not a load */ 647 647 cs->Iop = 0x8C; /* MOV reg,ES */ 648 648 cs->Irm = modregrm(3,0,reg & 7); 649 649 if (reg & 8) 650 650 code_orrex(cs, REX_B); 651 651 } 652 652 else // XXX reg,i 653 653 { 654 654 cs->Irm = modregrm(3,reg & 7,i & 7); 655 655 if (reg & 8) 656 656 cs->Irex |= REX_R; 657 657 if (i & 8) 658 658 cs->Irex |= REX_B; 659 if (sz == 1 && I64 && i >= 4)659 if (sz == 1 && I64 && (i >= 4 || reg >= 4)) 660 660 cs->Irex |= REX; 661 661 if (I64 && (sz == 8 || sz == 16)) 662 662 cs->Irex |= REX_W; 663 663 } 664 664 c = CNIL; 665 665 goto L2; 666 666 } 667 667 rm &= ~mask[i]; 668 668 } 669 669 } 670 670 } 671 671 672 672 L1: 673 673 c = getlvalue(cs,e,keepmsk); 674 674 if (offset == REGSIZE) 675 675 getlvalue_msw(cs); 676 676 else 677 677 cs->IEVoffset1 += offset; 678 678 if (I64 && reg >= 4 && sz == 1) // if byte register 679 679 // Can only address those 8 bit registers if a REX byte is present trunk/src/backend/cod1.c
r810 r819 639 639 { if (regcon.cse.value[i] == e && // if register has elem 640 640 /* watch out for a CWD destroying DX */ 641 641 !(i == DX && op == 0xF7 && desmsk & mDX)) 642 642 { 643 643 /* if ES, then it can only be a load */ 644 644 if (i == ES) 645 645 { if (op != 0x8B) 646 646 goto L1; /* not a load */ 647 647 cs->Iop = 0x8C; /* MOV reg,ES */ 648 648 cs->Irm = modregrm(3,0,reg & 7); 649 649 if (reg & 8) 650 650 code_orrex(cs, REX_B); 651 651 } 652 652 else // XXX reg,i 653 653 { 654 654 cs->Irm = modregrm(3,reg & 7,i & 7); 655 655 if (reg & 8) 656 656 cs->Irex |= REX_R; 657 657 if (i & 8) 658 658 cs->Irex |= REX_B; 659 if (sz == 1 && I64 && i >= 4)659 if (sz == 1 && I64 && (i >= 4 || reg >= 4)) 660 660 cs->Irex |= REX; 661 661 if (I64 && (sz == 8 || sz == 16)) 662 662 cs->Irex |= REX_W; 663 663 } 664 664 c = CNIL; 665 665 goto L2; 666 666 } 667 667 rm &= ~mask[i]; 668 668 } 669 669 } 670 670 } 671 671 672 672 L1: 673 673 c = getlvalue(cs,e,keepmsk); 674 674 if (offset == REGSIZE) 675 675 getlvalue_msw(cs); 676 676 else 677 677 cs->IEVoffset1 += offset; 678 678 if (I64 && reg >= 4 && sz == 1) // if byte register 679 679 // Can only address those 8 bit registers if a REX byte is present
