Changeset 67077 in vbox
- Timestamp:
- May 25, 2017 9:23:27 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-generated-1-template.c
r67076 r67077 1409 1409 #endif 1410 1410 1411 /** Also encodes idxField of the register operand using idxFieldBase. 1411 /** Also encodes idxField of the register operand using idxFieldBase. */ 1412 1412 static unsigned BS3_NEAR_CODE 1413 Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(PBS3CG1STATE pThis, bool fAddrOverride, unsigned off, 1414 uint8_t iReg, uint8_t cbMisalign) 1413 Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(PBS3CG1STATE pThis, unsigned off, uint8_t iReg) 1415 1414 { 1416 1415 pThis->aOperands[pThis->iRegOp].idxField = pThis->aOperands[pThis->iRegOp].idxFieldBase + iReg; 1417 return Bs3Cfg1EncodeMemMod0Disp(pThis, fAddrOverride, off, iReg & 7, pThis->aOperands[pThis->iRmOp].cbOp, cbMisalign, 1416 return Bs3Cfg1EncodeMemMod0Disp(pThis, false /*fAddrOverride*/, off, iReg & 7, 1417 pThis->aOperands[pThis->iRmOp].cbOp, 1418 0 /*cbMisalign*/, 1419 pThis->aOperands[pThis->iRmOp].enmLocation); 1420 } 1421 1422 1423 /** Also encodes idxField of the register operand using idxFieldBase. */ 1424 static unsigned BS3_NEAR_CODE 1425 Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaultsMisaligned(PBS3CG1STATE pThis, unsigned off, uint8_t iReg, uint8_t cbMisalign) 1426 { 1427 pThis->aOperands[pThis->iRegOp].idxField = pThis->aOperands[pThis->iRegOp].idxFieldBase + iReg; 1428 return Bs3Cfg1EncodeMemMod0Disp(pThis, false /*fAddrOverride*/, off, iReg & 7, 1429 pThis->aOperands[pThis->iRmOp].cbOp, 1430 cbMisalign, 1418 1431 pThis->aOperands[pThis->iRmOp].enmLocation); 1419 1432 } … … 1726 1739 pThis->aOperands[pThis->iRmOp ].enmLocation = pThis->aOperands[pThis->iRmOp].enmLocationMem; 1727 1740 off = Bs3Cg1InsertOpcodes(pThis, Bs3Cg1InsertReqPrefix(pThis, 0)); 1728 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 4 /*iReg*/, 0 /*cbMisalign*/);1741 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 4 /*iReg*/); 1729 1742 break; 1730 1743 case 4: 1731 1744 off = Bs3Cg1InsertOpcodes(pThis, Bs3Cg1InsertReqPrefix(pThis, 0)); 1732 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults (pThis, false, off, 7 /*iReg*/, 1 /*cbMisalign*/);1745 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaultsMisaligned(pThis, off, 7 /*iReg*/, 1 /*cbMisalign*/); 1733 1746 iEncoding += !BS3CG1_IS_64BIT_TARGET(pThis) ? 1 : 0; 1734 1747 break; … … 1738 1751 pThis->abCurInstr[off++] = REX__RBX; 1739 1752 off = Bs3Cg1InsertOpcodes(pThis, off); 1740 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 7 /*iReg - no +8*/, 0 /*cbMisalign*/);1753 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 7 /*iReg - no +8*/); 1741 1754 break; 1742 1755 #endif … … 1807 1820 pThis->aOperands[pThis->iRmOp ].enmLocation = pThis->aOperands[pThis->iRmOp].enmLocationMem; 1808 1821 off = Bs3Cg1InsertOpcodes(pThis, Bs3Cg1InsertReqPrefix(pThis, 0)); 1809 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 4 /*iReg*/, 0 /*cbMisalign*/);1822 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 4 /*iReg*/); 1810 1823 break; 1811 1824 case 4: 1812 1825 off = Bs3Cg1InsertOpcodes(pThis, Bs3Cg1InsertReqPrefix(pThis, 0)); 1813 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults (pThis, false, off, 7 /*iReg*/, 1 /*cbMisalign*/);1826 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaultsMisaligned(pThis, off, 7 /*iReg*/, 1 /*cbMisalign*/); 1814 1827 iEncoding += !BS3CG1_IS_64BIT_TARGET(pThis) ? 1 : 0; 1815 1828 break; … … 1819 1832 pThis->abCurInstr[off++] = REX__RBX; 1820 1833 off = Bs3Cg1InsertOpcodes(pThis, off); 1821 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 7 /*iReg*/, 0 /*cbMisalign*/);1834 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 7 /*iReg*/); 1822 1835 break; 1823 1836 #endif … … 1869 1882 pThis->abCurInstr[off++] = REX_W___; 1870 1883 off = Bs3Cg1InsertOpcodes(pThis, off); 1871 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 4 /*iReg*/, 0 /*cbMisalign*/);1884 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 4 /*iReg*/); 1872 1885 break; 1873 1886 case 4: … … 1875 1888 pThis->abCurInstr[off++] = REX_W___; 1876 1889 off = Bs3Cg1InsertOpcodes(pThis, off); 1877 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults (pThis, false, off, 7 /*iReg*/, 1 /*cbMisalign*/);1890 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaultsMisaligned(pThis, off, 7 /*iReg*/, 1 /*cbMisalign*/); 1878 1891 break; 1879 1892 case 5: … … 1881 1894 pThis->abCurInstr[off++] = REX_WRBX; 1882 1895 off = Bs3Cg1InsertOpcodes(pThis, off); 1883 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 7 /*iReg*/, 0 /*cbMisalign*/);1896 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 7 /*iReg*/); 1884 1897 break; 1885 1898 … … 1928 1941 pThis->aOperands[pThis->iRmOp ].enmLocation = pThis->aOperands[pThis->iRmOp].enmLocationMem; 1929 1942 off = Bs3Cg1InsertOpcodes(pThis, Bs3Cg1InsertReqPrefix(pThis, 0)); 1930 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 4 /*iReg*/, 0 /*cbMisalign*/);1943 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 4 /*iReg*/); 1931 1944 break; 1932 1945 case 4: 1933 1946 off = Bs3Cg1InsertOpcodes(pThis, Bs3Cg1InsertReqPrefix(pThis, 0)); 1934 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults (pThis, false, off, 7 /*iReg*/, 1 /*cbMisalign*/);1947 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaultsMisaligned(pThis, off, 7 /*iReg*/, 1 /*cbMisalign*/); 1935 1948 iEncoding += !BS3CG1_IS_64BIT_TARGET(pThis) ? 1 : 0; 1936 1949 break; … … 1940 1953 pThis->abCurInstr[off++] = REX__RBX; 1941 1954 off = Bs3Cg1InsertOpcodes(pThis, off); 1942 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 7+8 /*iReg*/, 0 /*cbMisalign*/);1955 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 7+8 /*iReg*/); 1943 1956 break; 1944 1957 #endif … … 1991 2004 pThis->abCurInstr[off++] = REX_W___; 1992 2005 off = Bs3Cg1InsertOpcodes(pThis, off); 1993 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 4 /*iReg*/, 0 /*cbMisalign*/);2006 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 4 /*iReg*/); 1994 2007 break; 1995 2008 case 5: … … 1997 2010 pThis->abCurInstr[off++] = REX_W___; 1998 2011 off = Bs3Cg1InsertOpcodes(pThis, off); 1999 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults (pThis, false, off, 7 /*iReg*/, 1 /*cbMisalign*/);2012 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaultsMisaligned(pThis, off, 7 /*iReg*/, 1 /*cbMisalign*/); 2000 2013 break; 2001 2014 case 6: … … 2003 2016 pThis->abCurInstr[off++] = REX_WRBX; 2004 2017 off = Bs3Cg1InsertOpcodes(pThis, off); 2005 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 7+8 /*iReg*/, 0 /*cbMisalign*/);2018 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 7+8 /*iReg*/); 2006 2019 break; 2007 2020 … … 2356 2369 case 0: 2357 2370 off = Bs3Cg1InsertOpcodes(pThis, Bs3Cg1InsertReqPrefix(pThis, 0)); 2358 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 4 /*iReg*/, 0 /*cbMisalign*/);2371 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 4 /*iReg*/); 2359 2372 break; 2360 2373 case 1: 2361 2374 off = Bs3Cg1InsertOpcodes(pThis, Bs3Cg1InsertReqPrefix(pThis, 0)); 2362 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults (pThis, false, off, 7 /*iReg*/, 1 /*cbMisalign*/);2375 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaultsMisaligned(pThis, off, 7 /*iReg*/, 1 /*cbMisalign*/); 2363 2376 iEncoding += !BS3CG1_IS_64BIT_TARGET(pThis) ? 1 : 0; 2364 2377 break; … … 2368 2381 pThis->abCurInstr[off++] = REX__RBX; 2369 2382 off = Bs3Cg1InsertOpcodes(pThis, off); 2370 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 7 /*iReg - no +8*/, 0 /*cbMisalign*/);2383 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 7 /*iReg - no +8*/); 2371 2384 break; 2372 2385 #endif … … 2381 2394 2382 2395 2383 static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_MODRM_M q_WO_Vq(PBS3CG1STATE pThis, unsigned iEncoding)2396 static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_MODRM_Msomething_WO_Vsomething(PBS3CG1STATE pThis, unsigned iEncoding) 2384 2397 { 2385 2398 unsigned off; 2386 if (iEncoding == 0) 2387 { 2388 pThis->aOperands[pThis->iRegOp].idxField = BS3CG1DST_XMM2_LO; 2389 off = Bs3Cg1InsertOpcodes(pThis, Bs3Cg1InsertReqPrefix(pThis, 0)); 2390 off = Bs3Cfg1EncodeMemMod0Disp(pThis, false, off, 2 /*iReg*/, 8, 0, BS3CG1OPLOC_MEM_WO); 2391 } 2392 else if (iEncoding == 1) 2393 { 2394 pThis->aOperands[pThis->iRegOp].idxField = BS3CG1DST_XMM3_LO; 2395 off = Bs3Cg1InsertOpcodes(pThis, Bs3Cg1InsertReqPrefix(pThis, 0)); 2396 off = Bs3Cfg1EncodeMemMod0Disp(pThis, false, off, 3 /*iReg*/, 8, 1 /*cbMisalign*/, BS3CG1OPLOC_MEM_WO); 2397 } 2398 else 2399 return 0; 2399 switch (iEncoding) 2400 { 2401 case 0: 2402 off = Bs3Cg1InsertOpcodes(pThis, Bs3Cg1InsertReqPrefix(pThis, 0)); 2403 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 2 /*iReg*/); 2404 break; 2405 case 1: 2406 off = Bs3Cg1InsertOpcodes(pThis, Bs3Cg1InsertReqPrefix(pThis, 0)); 2407 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaultsMisaligned(pThis, off, 3 /*iReg*/, 1 /*cbMisalign*/); 2408 break; 2409 default: 2410 return 0; 2411 } 2400 2412 pThis->cbCurInstr = off; 2401 2413 return iEncoding + 1; … … 2403 2415 2404 2416 2405 static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_MODRM_Mq_WO_VqHi(PBS3CG1STATE pThis, unsigned iEncoding)2406 {2407 unsigned off;2408 if (iEncoding == 0)2409 {2410 pThis->aOperands[pThis->iRegOp].idxField = BS3CG1DST_XMM2_HI;2411 off = Bs3Cg1InsertOpcodes(pThis, Bs3Cg1InsertReqPrefix(pThis, 0));2412 off = Bs3Cfg1EncodeMemMod0Disp(pThis, false, off, 2 /*iReg*/, 8, 0, BS3CG1OPLOC_MEM_WO);2413 }2414 else if (iEncoding == 1)2415 {2416 pThis->aOperands[pThis->iRegOp].idxField = BS3CG1DST_XMM3_HI;2417 off = Bs3Cg1InsertOpcodes(pThis, Bs3Cg1InsertReqPrefix(pThis, 0));2418 off = Bs3Cfg1EncodeMemMod0Disp(pThis, false, off, 3 /*iReg*/, 8, 1 /*cbMisalign*/, BS3CG1OPLOC_MEM_WO);2419 }2420 else2421 return 0;2422 pThis->cbCurInstr = off;2423 return iEncoding + 1;2424 }2425 2426 2427 2417 static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_MODRM_MsomethingWO_Vsomething_OR_ViceVersa(PBS3CG1STATE pThis, unsigned iEncoding) 2428 2418 { … … 2432 2422 case 0: 2433 2423 off = Bs3Cg1InsertOpcodes(pThis, Bs3Cg1InsertReqPrefix(pThis, 0)); 2434 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 2 /*iReg*/, 0);2424 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 2 /*iReg*/); 2435 2425 break; 2436 2426 case 1: 2437 2427 off = Bs3Cg1InsertOpcodes(pThis, Bs3Cg1InsertReqPrefix(pThis, 0)); 2438 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults (pThis, false, off, 2 /*iReg*/, 1 /*cbMisalign*/ );2428 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaultsMisaligned(pThis, off, 2 /*iReg*/, 1 /*cbMisalign*/ ); 2439 2429 if (!Bs3Cg1XcptTypeIsUnaligned(pThis->enmXcptType)) 2440 2430 pThis->bAlignmentXcpt = X86_XCPT_GP; … … 2445 2435 pThis->abCurInstr[off++] = REX__R__; 2446 2436 off = Bs3Cg1InsertOpcodes(pThis, off); 2447 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 2+8 /*iReg*/, 0);2437 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 2+8 /*iReg*/); 2448 2438 break; 2449 2439 default: … … 2743 2733 off = Bs3Cg1InsertVex2bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 1 /*~R*/); 2744 2734 off = Bs3Cg1InsertOpcodes(pThis, off); 2745 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 4 /*iReg*/, 0 /*cbMisalign*/);2735 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 4 /*iReg*/); 2746 2736 break; 2747 2737 case 6: 2748 2738 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 0 /*W*/); 2749 2739 off = Bs3Cg1InsertOpcodes(pThis, off); 2750 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 4 /*iReg*/, 0 /*cbMisalign*/);2740 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 4 /*iReg*/); 2751 2741 break; 2752 2742 case 7: 2753 2743 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 0 /*W*/); 2754 2744 off = Bs3Cg1InsertOpcodes(pThis, off); 2755 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults (pThis, false, off, 4 /*iReg*/, 1 /*cbMisalign*/);2745 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaultsMisaligned(pThis, off, 4 /*iReg*/, 1 /*cbMisalign*/); 2756 2746 iEncoding += !BS3CG1_IS_64BIT_TARGET(pThis) ? 2 : 0; 2757 2747 break; … … 2760 2750 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 0 /*~R*/, 1 /*~X*/, 1 /*~B*/, 0 /*W*/); 2761 2751 off = Bs3Cg1InsertOpcodes(pThis, off); 2762 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 4+8 /*iReg*/, 0 /*cbMisalign*/);2752 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 4+8 /*iReg*/); 2763 2753 break; 2764 2754 case 9: 2765 2755 off = Bs3Cg1InsertVex2bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 0 /*~R*/); 2766 2756 off = Bs3Cg1InsertOpcodes(pThis, off); 2767 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 5+8 /*iReg*/, 0 /*cbMisalign*/);2757 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 5+8 /*iReg*/); 2768 2758 iEncoding += 2; 2769 2759 break; … … 2773 2763 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 1 /*W*/); 2774 2764 off = Bs3Cg1InsertOpcodes(pThis, off); 2775 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 4 /*iReg*/, 0 /*cbMisalign*/);2765 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 4 /*iReg*/); 2776 2766 break; 2777 2767 … … 2828 2818 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 1 /*W*/); 2829 2819 off = Bs3Cg1InsertOpcodes(pThis, off); 2830 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 4 /*iReg*/, 0 /*cbMisalign*/);2820 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 4 /*iReg*/); 2831 2821 break; 2832 2822 case 5: 2833 2823 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 1 /*W*/); 2834 2824 off = Bs3Cg1InsertOpcodes(pThis, off); 2835 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults (pThis, false, off, 4 /*iReg*/, 1 /*cbMisalign*/);2825 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaultsMisaligned(pThis, off, 4 /*iReg*/, 1 /*cbMisalign*/); 2836 2826 iEncoding += !BS3CG1_IS_64BIT_TARGET(pThis) ? 2 : 0; 2837 2827 break; … … 2839 2829 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 0 /*~R*/, 1 /*~X*/, 1 /*~B*/, 1 /*W*/); 2840 2830 off = Bs3Cg1InsertOpcodes(pThis, off); 2841 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 4+8 /*iReg*/, 0 /*cbMisalign*/);2831 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 4+8 /*iReg*/); 2842 2832 break; 2843 2833 … … 3041 3031 off = Bs3Cg1InsertVex2bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, iEncoding >= 20 /*L*/, 1 /*~R*/); 3042 3032 off = Bs3Cg1InsertOpcodes(pThis, off); 3043 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 0, 0);3033 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 0); 3044 3034 iEncoding += !BS3CG1_IS_64BIT_TARGET(pThis) ? 1 : 0; 3045 3035 break; … … 3049 3039 off = Bs3Cg1InsertVex2bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, iEncoding >= 20 /*L*/, 0 /*~R*/); 3050 3040 off = Bs3Cg1InsertOpcodes(pThis, off); 3051 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 7 + 8, 0);3041 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 7 + 8); 3052 3042 break; 3053 3043 #endif … … 3056 3046 off = Bs3Cg1InsertVex2bPrefix(pThis, 0 /*offDst*/, 0xe /*~V*/, iEncoding >= 20 /*L*/, 1 /*~R*/); 3057 3047 off = Bs3Cg1InsertOpcodes(pThis, off); 3058 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 0, 0);3048 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 0); 3059 3049 pThis->fInvalidEncoding = true; 3060 3050 break; … … 3063 3053 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, iEncoding >= 20 /*L*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 0 /*W*/); 3064 3054 off = Bs3Cg1InsertOpcodes(pThis, off); 3065 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 1, 0);3055 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 1); 3066 3056 break; 3067 3057 case 4: … … 3069 3059 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, iEncoding >= 20 /*L*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 1 /*W-ignored*/); 3070 3060 off = Bs3Cg1InsertOpcodes(pThis, off); 3071 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 5, 0);3061 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 5); 3072 3062 iEncoding += !BS3CG1_IS_64BIT_TARGET(pThis) ? 3 : 0; 3073 3063 break; … … 3077 3067 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, iEncoding >= 20 /*L*/, 0 /*~R*/, 1 /*~X*/, 1 /*~B*/, 0 /*W*/); 3078 3068 off = Bs3Cg1InsertOpcodes(pThis, off); 3079 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 5+8, 0);3069 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 5+8); 3080 3070 break; 3081 3071 case 6: … … 3083 3073 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, iEncoding >= 20 /*L*/, 1 /*~R*/, 1 /*~X*/, 0 /*~B-ignored*/, 0 /*W*/); 3084 3074 off = Bs3Cg1InsertOpcodes(pThis, off); 3085 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 1, 0);3075 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 1); 3086 3076 break; 3087 3077 case 7: … … 3089 3079 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, iEncoding >= 20 /*L*/, 1 /*~R*/, 0 /*~X-ignored*/, 1 /*~B*/, 0 /*W*/); 3090 3080 off = Bs3Cg1InsertOpcodes(pThis, off); 3091 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 2, 0);3081 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 2); 3092 3082 break; 3093 3083 #endif … … 3096 3086 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0 /*~V*/, iEncoding >= 20 /*L*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 0 /*W*/); 3097 3087 off = Bs3Cg1InsertOpcodes(pThis, off); 3098 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 5, 0);3088 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 5); 3099 3089 pThis->fInvalidEncoding = true; 3100 3090 break; … … 3103 3093 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 7 /*~V*/, iEncoding >= 20 /*L*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 0 /*W*/); 3104 3094 off = Bs3Cg1InsertOpcodes(pThis, off); 3105 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 2, 0);3095 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 2); 3106 3096 pThis->fInvalidEncoding = true; 3107 3097 iEncoding += 10; … … 3130 3120 off = Bs3Cg1InsertVex2bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 1 /*~R*/); 3131 3121 off = Bs3Cg1InsertOpcodes(pThis, off); 3132 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 0, 0);3122 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 0); 3133 3123 break; 3134 3124 case 1: 3135 3125 off = Bs3Cg1InsertVex2bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 1 /*L - ignored*/, 1 /*~R*/); 3136 3126 off = Bs3Cg1InsertOpcodes(pThis, off); 3137 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 7, 0);3127 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 7); 3138 3128 iEncoding += !BS3CG1_IS_64BIT_TARGET(pThis) ? 1 : 0; 3139 3129 break; … … 3142 3132 off = Bs3Cg1InsertVex2bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 1 /*L - ignored*/, 0 /*~R*/); 3143 3133 off = Bs3Cg1InsertOpcodes(pThis, off); 3144 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 7 + 8, 0);3134 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 7 + 8); 3145 3135 break; 3146 3136 #endif … … 3149 3139 off = Bs3Cg1InsertVex2bPrefix(pThis, 0 /*offDst*/, 0xe /*~V*/, 0 /*L*/, 1 /*~R*/); 3150 3140 off = Bs3Cg1InsertOpcodes(pThis, off); 3151 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 0, 0);3141 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 0); 3152 3142 pThis->fInvalidEncoding = true; 3153 3143 break; … … 3155 3145 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 0 /*W*/); 3156 3146 off = Bs3Cg1InsertOpcodes(pThis, off); 3157 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 1, 0);3147 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 1); 3158 3148 break; 3159 3149 case 5: 3160 3150 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 1 /*L-ignored*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 0 /*W*/); 3161 3151 off = Bs3Cg1InsertOpcodes(pThis, off); 3162 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 1, 0);3152 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 1); 3163 3153 break; 3164 3154 case 6: 3165 3155 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 1 /*W-ignored*/); 3166 3156 off = Bs3Cg1InsertOpcodes(pThis, off); 3167 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 5, 0);3157 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 5); 3168 3158 iEncoding += !BS3CG1_IS_64BIT_TARGET(pThis) ? 3 : 0; 3169 3159 break; … … 3172 3162 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 0 /*~R*/, 1 /*~X*/, 1 /*~B*/, 0 /*W*/); 3173 3163 off = Bs3Cg1InsertOpcodes(pThis, off); 3174 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 5+8, 0);3164 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 5+8); 3175 3165 break; 3176 3166 case 8: 3177 3167 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 1 /*~R*/, 1 /*~X*/, 0 /*~B-ignored*/, 0 /*W*/); 3178 3168 off = Bs3Cg1InsertOpcodes(pThis, off); 3179 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 1, 0);3169 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 1); 3180 3170 break; 3181 3171 case 9: 3182 3172 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 1 /*~R*/, 0 /*~X-ignored*/, 1 /*~B*/, 0 /*W*/); 3183 3173 off = Bs3Cg1InsertOpcodes(pThis, off); 3184 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 2, 0);3174 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 2); 3185 3175 break; 3186 3176 #endif … … 3188 3178 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0 /*~V*/, 0 /*L*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 0 /*W*/); 3189 3179 off = Bs3Cg1InsertOpcodes(pThis, off); 3190 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 5, 0);3180 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 5); 3191 3181 pThis->fInvalidEncoding = true; 3192 3182 break; … … 3194 3184 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 7 /*~V*/, 0 /*L*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 0 /*W*/); 3195 3185 off = Bs3Cg1InsertOpcodes(pThis, off); 3196 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 2, 0);3186 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 2); 3197 3187 pThis->fInvalidEncoding = true; 3198 3188 break; … … 3218 3208 off = Bs3Cg1InsertVex2bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 1 /*~R*/); 3219 3209 off = Bs3Cg1InsertOpcodes(pThis, off); 3220 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 0, 0);3210 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 0); 3221 3211 break; 3222 3212 case 1: 3223 3213 off = Bs3Cg1InsertVex2bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 1 /*L - invalid*/, 1 /*~R*/); 3224 3214 off = Bs3Cg1InsertOpcodes(pThis, off); 3225 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 7, 0);3215 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 7); 3226 3216 pThis->fInvalidEncoding = true; 3227 3217 iEncoding += !BS3CG1_IS_64BIT_TARGET(pThis) ? 2 : 0; … … 3231 3221 off = Bs3Cg1InsertVex2bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 0 /*~R*/); 3232 3222 off = Bs3Cg1InsertOpcodes(pThis, off); 3233 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 7 + 8, 0);3223 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 7 + 8); 3234 3224 break; 3235 3225 case 3: 3236 3226 off = Bs3Cg1InsertVex2bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 1 /*L - invalid*/, 0 /*~R*/); 3237 3227 off = Bs3Cg1InsertOpcodes(pThis, off); 3238 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 5 + 8, 0);3228 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 5 + 8); 3239 3229 pThis->fInvalidEncoding = true; 3240 3230 break; … … 3243 3233 off = Bs3Cg1InsertVex2bPrefix(pThis, 0 /*offDst*/, 0xe /*~V*/, 0 /*L*/, 1 /*~R*/); 3244 3234 off = Bs3Cg1InsertOpcodes(pThis, off); 3245 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 0, 0);3235 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 0); 3246 3236 pThis->fInvalidEncoding = true; 3247 3237 break; … … 3249 3239 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 0 /*W*/); 3250 3240 off = Bs3Cg1InsertOpcodes(pThis, off); 3251 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 1, 0);3241 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 1); 3252 3242 break; 3253 3243 case 6: 3254 3244 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 1 /*L - invalid*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 0 /*W*/); 3255 3245 off = Bs3Cg1InsertOpcodes(pThis, off); 3256 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 1, 0);3246 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 1); 3257 3247 pThis->fInvalidEncoding = true; 3258 3248 break; … … 3260 3250 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 1 /*W-ignored*/); 3261 3251 off = Bs3Cg1InsertOpcodes(pThis, off); 3262 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 5, 0);3252 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 5); 3263 3253 iEncoding += !BS3CG1_IS_64BIT_TARGET(pThis) ? 3 : 0; 3264 3254 break; … … 3267 3257 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 0 /*~R*/, 1 /*~X*/, 1 /*~B*/, 0 /*W*/); 3268 3258 off = Bs3Cg1InsertOpcodes(pThis, off); 3269 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 5+8, 0);3259 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 5+8); 3270 3260 break; 3271 3261 case 9: 3272 3262 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 1 /*~R*/, 1 /*~X*/, 0 /*~B-ignored*/, 0 /*W*/); 3273 3263 off = Bs3Cg1InsertOpcodes(pThis, off); 3274 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 1, 0);3264 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 1); 3275 3265 break; 3276 3266 case 10: 3277 3267 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 1 /*~R*/, 0 /*~X-ignored*/, 1 /*~B*/, 0 /*W*/); 3278 3268 off = Bs3Cg1InsertOpcodes(pThis, off); 3279 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 2, 0);3269 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 2); 3280 3270 break; 3281 3271 #endif … … 3283 3273 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0 /*~V*/, 0 /*L*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 0 /*W*/); 3284 3274 off = Bs3Cg1InsertOpcodes(pThis, off); 3285 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 5, 0);3275 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 5); 3286 3276 pThis->fInvalidEncoding = true; 3287 3277 break; … … 3289 3279 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 7 /*~V*/, 0 /*L*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 0 /*W*/); 3290 3280 off = Bs3Cg1InsertOpcodes(pThis, off); 3291 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 2, 0);3281 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 2); 3292 3282 pThis->fInvalidEncoding = true; 3293 3283 break; … … 3312 3302 off = Bs3Cg1InsertVex2bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, uVexL, 1 /*~R*/); 3313 3303 off = Bs3Cg1InsertOpcodes(pThis, off); 3314 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 0, 0);3304 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 0); 3315 3305 iEncoding += !BS3CG1_IS_64BIT_TARGET(pThis) ? 1 : 0; 3316 3306 break; … … 3319 3309 off = Bs3Cg1InsertVex2bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, uVexL, 0 /*~R*/); 3320 3310 off = Bs3Cg1InsertOpcodes(pThis, off); 3321 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 7 + 8, 0);3311 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 7 + 8); 3322 3312 break; 3323 3313 #endif … … 3325 3315 off = Bs3Cg1InsertVex2bPrefix(pThis, 0 /*offDst*/, 0xe /*~V*/, uVexL, 1 /*~R*/); 3326 3316 off = Bs3Cg1InsertOpcodes(pThis, off); 3327 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 0, 0);3317 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 0); 3328 3318 pThis->fInvalidEncoding = true; 3329 3319 break; … … 3331 3321 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, uVexL, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 0 /*W*/); 3332 3322 off = Bs3Cg1InsertOpcodes(pThis, off); 3333 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 1, 0);3323 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 1); 3334 3324 break; 3335 3325 case 4: 3336 3326 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, uVexL, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 1 /*W-ignored*/); 3337 3327 off = Bs3Cg1InsertOpcodes(pThis, off); 3338 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 5, 0);3328 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 5); 3339 3329 iEncoding += !BS3CG1_IS_64BIT_TARGET(pThis) ? 3 : 0; 3340 3330 break; … … 3343 3333 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, uVexL, 0 /*~R*/, 1 /*~X*/, 1 /*~B*/, 0 /*W*/); 3344 3334 off = Bs3Cg1InsertOpcodes(pThis, off); 3345 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 5+8, 0);3335 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 5+8); 3346 3336 break; 3347 3337 case 6: 3348 3338 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, uVexL, 1 /*~R*/, 1 /*~X*/, 0 /*~B-ignored*/, 0 /*W*/); 3349 3339 off = Bs3Cg1InsertOpcodes(pThis, off); 3350 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 1, 0);3340 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 1); 3351 3341 break; 3352 3342 case 7: 3353 3343 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, uVexL, 1 /*~R*/, 0 /*~X-ignored*/, 1 /*~B*/, 0 /*W*/); 3354 3344 off = Bs3Cg1InsertOpcodes(pThis, off); 3355 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 2, 0);3345 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 2); 3356 3346 break; 3357 3347 #endif … … 3359 3349 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0 /*~V*/, uVexL, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 0 /*W*/); 3360 3350 off = Bs3Cg1InsertOpcodes(pThis, off); 3361 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 5, 0);3351 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 5); 3362 3352 pThis->fInvalidEncoding = true; 3363 3353 break; … … 3365 3355 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 7 /*~V*/, uVexL, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 0 /*W*/); 3366 3356 off = Bs3Cg1InsertOpcodes(pThis, off); 3367 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 2, 0);3357 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 2); 3368 3358 pThis->fInvalidEncoding = true; 3369 3359 break; … … 3411 3401 off = Bs3Cg1InsertVex2bPrefix(pThis, 0 /*offDst*/, 0xc /*~V*/, 0 /*L*/, 1 /*~R*/); 3412 3402 off = Bs3Cg1InsertOpcodes(pThis, off); 3413 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 0, 0);3403 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 0); 3414 3404 pThis->aOperands[1].idxField = pThis->aOperands[1].idxFieldBase + 3; 3415 3405 break; … … 3417 3407 off = Bs3Cg1InsertVex2bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 1 /*L*/, 1 /*~R*/); 3418 3408 off = Bs3Cg1InsertOpcodes(pThis, off); 3419 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 7, 0);3409 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 7); 3420 3410 pThis->aOperands[1].idxField = pThis->aOperands[1].idxFieldBase + 0; 3421 3411 pThis->fInvalidEncoding = true; … … 3426 3416 off = Bs3Cg1InsertVex2bPrefix(pThis, 0 /*offDst*/, 0x1 /*~V*/, 0 /*L*/, 0 /*~R*/); 3427 3417 off = Bs3Cg1InsertOpcodes(pThis, off); 3428 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 7 + 8, 0);3418 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 7 + 8); 3429 3419 pThis->aOperands[1].idxField = pThis->aOperands[1].idxFieldBase + 14; 3430 3420 break; … … 3433 3423 off = Bs3Cg1InsertVex2bPrefix(pThis, 0 /*offDst*/, 0xe /*~V*/, 0 /*L*/, 1 /*~R*/); 3434 3424 off = Bs3Cg1InsertOpcodes(pThis, off); 3435 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 0, 0);3425 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 0); 3436 3426 pThis->aOperands[1].idxField = pThis->aOperands[1].idxFieldBase + 1; 3437 3427 break; … … 3439 3429 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 0 /*W*/); 3440 3430 off = Bs3Cg1InsertOpcodes(pThis, off); 3441 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 1, 0);3431 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 1); 3442 3432 pThis->aOperands[1].idxField = pThis->aOperands[1].idxFieldBase + 0; 3443 3433 break; … … 3445 3435 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 1 /*L-ignored*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 0 /*W*/); 3446 3436 off = Bs3Cg1InsertOpcodes(pThis, off); 3447 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 1, 0);3437 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 1); 3448 3438 pThis->aOperands[1].idxField = pThis->aOperands[1].idxFieldBase + 0; 3449 3439 pThis->fInvalidEncoding = true; … … 3452 3442 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 1 /*W-ignored*/); 3453 3443 off = Bs3Cg1InsertOpcodes(pThis, off); 3454 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 5, 0);3444 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 5); 3455 3445 pThis->aOperands[1].idxField = pThis->aOperands[1].idxFieldBase + 0; 3456 3446 iEncoding += !BS3CG1_IS_64BIT_TARGET(pThis) ? 3 : 0; … … 3460 3450 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 0 /*~R*/, 1 /*~X*/, 1 /*~B*/, 0 /*W*/); 3461 3451 off = Bs3Cg1InsertOpcodes(pThis, off); 3462 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 5+8, 0);3452 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 5+8); 3463 3453 pThis->aOperands[1].idxField = pThis->aOperands[1].idxFieldBase + 0; 3464 3454 break; … … 3466 3456 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 1 /*~R*/, 1 /*~X*/, 0 /*~B-ignored*/, 0 /*W*/); 3467 3457 off = Bs3Cg1InsertOpcodes(pThis, off); 3468 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 1, 0);3458 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 1); 3469 3459 pThis->aOperands[1].idxField = pThis->aOperands[1].idxFieldBase + 0; 3470 3460 break; … … 3472 3462 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 1 /*~R*/, 0 /*~X-ignored*/, 1 /*~B*/, 0 /*W*/); 3473 3463 off = Bs3Cg1InsertOpcodes(pThis, off); 3474 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 2, 0);3464 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 2); 3475 3465 pThis->aOperands[1].idxField = pThis->aOperands[1].idxFieldBase + 0; 3476 3466 break; … … 3479 3469 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0 /*~V*/, 1 /*L*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 0 /*W*/); 3480 3470 off = Bs3Cg1InsertOpcodes(pThis, off); 3481 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 5, 0);3471 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 5); 3482 3472 pThis->aOperands[1].idxField = pThis->aOperands[1].idxFieldBase + (BS3CG1_IS_64BIT_TARGET(pThis) ? 15 : 7); 3483 3473 pThis->fInvalidEncoding = true; … … 3601 3591 off = Bs3Cg1InsertVex2bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 1 /*~R*/); 3602 3592 off = Bs3Cg1InsertOpcodes(pThis, off); 3603 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 2 /*iReg*/, 0);3593 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 2 /*iReg*/); 3604 3594 break; 3605 3595 case 4: 3606 3596 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 0 /*W*/); 3607 3597 off = Bs3Cg1InsertOpcodes(pThis, off); 3608 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 3 /*iReg*/, 0);3598 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 3 /*iReg*/); 3609 3599 break; 3610 3600 case 5: 3611 3601 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 1 /*W - ignored */); 3612 3602 off = Bs3Cg1InsertOpcodes(pThis, off); 3613 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 3 /*iReg*/, 0);3603 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 3 /*iReg*/); 3614 3604 break; 3615 3605 case 6: 3616 3606 off = Bs3Cg1InsertVex2bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 1 /*~R*/); 3617 3607 off = Bs3Cg1InsertOpcodes(pThis, off); 3618 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults (pThis, false, off, 3 /*iReg*/, 1 /*cbMisalign*/);3608 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaultsMisaligned(pThis, off, 3 /*iReg*/, 1 /*cbMisalign*/); 3619 3609 if (!Bs3Cg1XcptTypeIsVexUnaligned(pThis->enmXcptType)) 3620 3610 pThis->bAlignmentXcpt = X86_XCPT_GP; … … 3623 3613 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 0 /*W*/); 3624 3614 off = Bs3Cg1InsertOpcodes(pThis, off); 3625 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults (pThis, false, off, 3 /*iReg*/, 1 /*cbMisalign*/);3615 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaultsMisaligned(pThis, off, 3 /*iReg*/, 1 /*cbMisalign*/); 3626 3616 if (!Bs3Cg1XcptTypeIsVexUnaligned(pThis->enmXcptType)) 3627 3617 pThis->bAlignmentXcpt = X86_XCPT_GP; … … 3702 3692 off = Bs3Cg1InsertVex2bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, iEncoding >= 20 /*L*/, 1 /*~R*/); 3703 3693 off = Bs3Cg1InsertOpcodes(pThis, off); 3704 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 2 /*iReg*/, 0);3694 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 2 /*iReg*/); 3705 3695 break; 3706 3696 case 4: … … 3708 3698 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, iEncoding >= 20 /*L*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 0 /*W*/); 3709 3699 off = Bs3Cg1InsertOpcodes(pThis, off); 3710 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 3 /*iReg*/, 0);3700 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 3 /*iReg*/); 3711 3701 break; 3712 3702 case 5: … … 3714 3704 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, iEncoding >= 20 /*L*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 1 /*W - ignored */); 3715 3705 off = Bs3Cg1InsertOpcodes(pThis, off); 3716 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 3 /*iReg*/, 0);3706 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, off, 3 /*iReg*/); 3717 3707 break; 3718 3708 case 6: … … 3720 3710 off = Bs3Cg1InsertVex2bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, iEncoding >= 20 /*L*/, 1 /*~R*/); 3721 3711 off = Bs3Cg1InsertOpcodes(pThis, off); 3722 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults (pThis, false, off, 3 /*iReg*/, 1 /*cbMisalign*/);3712 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaultsMisaligned(pThis, off, 3 /*iReg*/, 1 /*cbMisalign*/); 3723 3713 if (!Bs3Cg1XcptTypeIsVexUnaligned(pThis->enmXcptType)) 3724 3714 pThis->bAlignmentXcpt = X86_XCPT_GP; … … 3728 3718 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, iEncoding >= 20 /*L*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 0 /*W*/); 3729 3719 off = Bs3Cg1InsertOpcodes(pThis, off); 3730 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults (pThis, false, off, 3 /*iReg*/, 1 /*cbMisalign*/);3720 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaultsMisaligned(pThis, off, 3 /*iReg*/, 1 /*cbMisalign*/); 3731 3721 if (!Bs3Cg1XcptTypeIsVexUnaligned(pThis->enmXcptType)) 3732 3722 pThis->bAlignmentXcpt = X86_XCPT_GP; … … 3998 3988 case BS3CG1ENC_MODRM_Md_WO: 3999 3989 return Bs3Cg1EncodeNext_MODRM_Md_WO(pThis, iEncoding); 4000 case BS3CG1ENC_MODRM_Mq_WO_Vq:4001 return Bs3Cg1EncodeNext_MODRM_Mq_WO_Vq(pThis, iEncoding);4002 case BS3CG1ENC_MODRM_Mq_WO_VqHi:4003 return Bs3Cg1EncodeNext_MODRM_Mq_WO_VqHi(pThis, iEncoding);4004 3990 4005 3991 case BS3CG1ENC_FIXED: … … 4389 4375 case BS3CG1ENC_MODRM_Mq_WO_Vq: 4390 4376 case BS3CG1ENC_MODRM_Mq_WO_VqHi: 4377 pThis->pfnEncoder = Bs3Cg1EncodeNext_MODRM_Msomething_WO_Vsomething; 4391 4378 pThis->iRmOp = 0; 4392 4379 pThis->iRegOp = 1; 4393 4380 pThis->aOperands[0].cbOp = 8; 4394 4381 pThis->aOperands[1].cbOp = 8; 4395 pThis->aOperands[0].enmLocation = BS3CG1OPLOC_MEM_WO; 4396 pThis->aOperands[1].enmLocation = BS3CG1OPLOC_CTX; 4382 pThis->aOperands[0].enmLocation = BS3CG1OPLOC_MEM_WO; 4383 pThis->aOperands[0].enmLocationMem = BS3CG1OPLOC_MEM_WO; 4384 pThis->aOperands[1].enmLocation = BS3CG1OPLOC_CTX; 4385 pThis->aOperands[1].idxFieldBase = pThis->enmEncoding == BS3CG1ENC_MODRM_Mq_WO_Vq 4386 ? BS3CG1DST_XMM0_LO : BS3CG1DST_XMM0_HI; 4397 4387 break; 4398 4388
Note:
See TracChangeset
for help on using the changeset viewer.