VirtualBox

Changeset 9792 in vbox


Ignore:
Timestamp:
Jun 18, 2008 3:19:19 PM (17 years ago)
Author:
vboxsync
Message:

Byte, word and dword access to r8-r15.

Location:
trunk/src/VBox/Disassembler
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Disassembler/DisasmCore.cpp

    r9761 r9792  
    21422142#if !defined(DIS_CORE_ONLY) && defined(LOG_ENABLED)
    21432143static const char *szModRMReg8[]      = {"AL", "CL", "DL", "BL", "AH", "CH", "DH", "BH"};
    2144 static const char *szModRMReg8_64[]   = {"AL", "CL", "DL", "BL", "AH", "CH", "DH", "BH", "R8L", "R9L", "R10L", "R11L", "R12L", "R13L", "R14L", "R15L"};
     2144static const char *szModRMReg8_64[]   = {"AL", "CL", "DL", "BL", "AH", "CH", "DH", "BH", "R8B", "R9B", "R10B", "R11B", "R12B", "R13B", "R14B", "R15B"};
    21452145static const char *szModRMReg16[]     = {"AX", "CX", "DX", "BX", "SP", "BP", "SI", "DI"};
     2146static const char *szModRMReg16_64[]  = {"AX", "CX", "DX", "BX", "SP", "BP", "SI", "DI", "R8W", "R9W", "R10W", "R11W", "R12W", "R13W", "R14W", "R15W"};
    21462147static const char *szModRMReg32[]     = {"EAX", "ECX", "EDX", "EBX", "ESP", "EBP", "ESI", "EDI"};
     2148static const char *szModRMReg32_64[]  = {"EAX", "ECX", "EDX", "EBX", "ESP", "EBP", "ESI", "EDI", "R8D", "R9D", "R10D", "R11D", "R12D", "R13D", "R14D", "R15D"};
    21472149static const char *szModRMReg64[]     = {"RAX", "RCX", "RDX", "RBX", "RSP", "RBP", "RSI", "RDI", "R8", "R9", "R10", "R11", "R12", "R13", "R14", "R15"};
    21482150static const char *szModRMReg1616[8]  = {"BX+SI", "BX+DI", "BP+SI", "BP+DI", "SI", "DI", "BP", "BX"};
     
    21962198
    21972199    case OP_PARM_w:
    2198         disasmAddString(pParam->szParam, szModRMReg16[idx]);
     2200#if !defined(DIS_CORE_ONLY) && defined(LOG_ENABLED)
     2201        if (idx > RT_ELEMENTS(szModRMReg8))
     2202            disasmAddString(pParam->szParam, szModRMReg16_64[idx]);
     2203        else
     2204            disasmAddString(pParam->szParam, szModRMReg16[idx]);
     2205#endif
    21992206        pParam->flags |= USE_REG_GEN16;
    22002207        pParam->base.reg_gen = idx;
     
    22022209
    22032210    case OP_PARM_d:
    2204         disasmAddString(pParam->szParam, szModRMReg32[idx]);
     2211#if !defined(DIS_CORE_ONLY) && defined(LOG_ENABLED)
     2212        if (idx > RT_ELEMENTS(szModRMReg8))
     2213            disasmAddString(pParam->szParam, szModRMReg32_64[idx]);
     2214        else
     2215            disasmAddString(pParam->szParam, szModRMReg32[idx]);
     2216#endif
    22052217        pParam->flags |= USE_REG_GEN32;
    22062218        pParam->base.reg_gen = idx;
  • trunk/src/VBox/Disassembler/DisasmReg.cpp

    r9762 r9792  
    9595    RT_OFFSETOF(CPUMCTXCORE, ebp),        /* USE_REG_EBP */
    9696    RT_OFFSETOF(CPUMCTXCORE, esi),        /* USE_REG_ESI */
    97     RT_OFFSETOF(CPUMCTXCORE, edi)         /* USE_REG_EDI */
     97    RT_OFFSETOF(CPUMCTXCORE, edi),        /* USE_REG_EDI */
     98    RT_OFFSETOF(CPUMCTXCORE, r8),         /* USE_REG_R8  : dword access */
     99    RT_OFFSETOF(CPUMCTXCORE, r9),         /* USE_REG_R9  : dword access */
     100    RT_OFFSETOF(CPUMCTXCORE, r10),        /* USE_REG_R10 : dword access */
     101    RT_OFFSETOF(CPUMCTXCORE, r11),        /* USE_REG_R11 : dword access */
     102    RT_OFFSETOF(CPUMCTXCORE, r12),        /* USE_REG_R12 : dword access */
     103    RT_OFFSETOF(CPUMCTXCORE, r13),        /* USE_REG_R13 : dword access */
     104    RT_OFFSETOF(CPUMCTXCORE, r14),        /* USE_REG_R14 : dword access */
     105    RT_OFFSETOF(CPUMCTXCORE, r15)         /* USE_REG_R15 : dword access */
    98106};
    99107
     
    118126    RT_OFFSETOF(CPUMCTXCORE, ebp),        /* USE_REG_BP */
    119127    RT_OFFSETOF(CPUMCTXCORE, esi),        /* USE_REG_SI */
    120     RT_OFFSETOF(CPUMCTXCORE, edi)         /* USE_REG_DI */
     128    RT_OFFSETOF(CPUMCTXCORE, edi),        /* USE_REG_DI */
     129    RT_OFFSETOF(CPUMCTXCORE, r8),         /* USE_REG_R8  : word access */
     130    RT_OFFSETOF(CPUMCTXCORE, r9),         /* USE_REG_R9  : word access */
     131    RT_OFFSETOF(CPUMCTXCORE, r10),        /* USE_REG_R10 : word access */
     132    RT_OFFSETOF(CPUMCTXCORE, r11),        /* USE_REG_R11 : word access */
     133    RT_OFFSETOF(CPUMCTXCORE, r12),        /* USE_REG_R12 : word access */
     134    RT_OFFSETOF(CPUMCTXCORE, r13),        /* USE_REG_R13 : word access */
     135    RT_OFFSETOF(CPUMCTXCORE, r14),        /* USE_REG_R14 : word access */
     136    RT_OFFSETOF(CPUMCTXCORE, r15)         /* USE_REG_R15 : word access */
    121137};
    122138
     
    141157    RT_OFFSETOF(CPUMCTXCORE, ecx) + 1,    /* USE_REG_CH */
    142158    RT_OFFSETOF(CPUMCTXCORE, edx) + 1,    /* USE_REG_DH */
    143     RT_OFFSETOF(CPUMCTXCORE, ebx) + 1     /* USE_REG_BH */
     159    RT_OFFSETOF(CPUMCTXCORE, ebx) + 1,    /* USE_REG_BH */
     160    RT_OFFSETOF(CPUMCTXCORE, r8),         /* USE_REG_R8  : byte access */
     161    RT_OFFSETOF(CPUMCTXCORE, r9),         /* USE_REG_R9  : byte access */
     162    RT_OFFSETOF(CPUMCTXCORE, r10),        /* USE_REG_R10 : byte access */
     163    RT_OFFSETOF(CPUMCTXCORE, r11),        /* USE_REG_R11 : byte access */
     164    RT_OFFSETOF(CPUMCTXCORE, r12),        /* USE_REG_R12 : byte access */
     165    RT_OFFSETOF(CPUMCTXCORE, r13),        /* USE_REG_R13 : byte access */
     166    RT_OFFSETOF(CPUMCTXCORE, r14),        /* USE_REG_R14 : byte access */
     167    RT_OFFSETOF(CPUMCTXCORE, r15)         /* USE_REG_R15 : byte access */
    144168};
    145169
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette