Changeset 11456 in vbox for trunk/src/VBox/VMM/VMMAll
- Timestamp:
- Aug 18, 2008 9:23:18 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IOMAll.cpp
r10381 r11456 38 38 39 39 40 /**41 * Calculates the size of register parameter.42 *43 * @returns 1, 2, 4 on success.44 * @returns 0 if non-register parameter.45 * @param pCpu Pointer to current disassembler context.46 * @param pParam Pointer to parameter of instruction to proccess.47 */48 static unsigned iomGetRegSize(PDISCPUSTATE pCpu, PCOP_PARAMETER pParam)49 {50 if (pParam->flags & (USE_BASE | USE_INDEX | USE_SCALE | USE_DISPLACEMENT8 | USE_DISPLACEMENT16 | USE_DISPLACEMENT32 | USE_IMMEDIATE8 | USE_IMMEDIATE16 | USE_IMMEDIATE32 | USE_IMMEDIATE16_SX8 | USE_IMMEDIATE32_SX8))51 return 0;52 53 if (pParam->flags & USE_REG_GEN32)54 return 4;55 56 if (pParam->flags & USE_REG_GEN16)57 return 2;58 59 if (pParam->flags & USE_REG_GEN8)60 return 1;61 62 if (pParam->flags & USE_REG_GEN64)63 return 8;64 65 if (pParam->flags & USE_REG_SEG)66 return 2;67 return 0;68 }69 70 40 71 41 /** … … 74 44 * @returns true on success. 75 45 * 46 * @todo Get rid of this code. Use DISQueryParamVal instead 47 * 76 48 * @param pCpu Pointer to current disassembler context. 77 49 * @param pParam Pointer to parameter of instruction to proccess. … … 884 856 AssertMsg(fRc, ("Failed to get reg/imm port number!\n")); NOREF(fRc); 885 857 886 cbSize = iomGetRegSize(pCpu, &pCpu->param1);858 cbSize = DISGetParamSize(pCpu, &pCpu->param1); 887 859 Assert(cbSize > 0); 888 860 int rc = IOMInterpretCheckPortIOAccess(pVM, pRegFrame, uPort, cbSize);
Note:
See TracChangeset
for help on using the changeset viewer.