Changeset 47752 in vbox for trunk/src/VBox/VMM/VMMAll
- Timestamp:
- Aug 15, 2013 11:38:36 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllInstructions.cpp.h
r47744 r47752 7910 7910 } 7911 7911 7912 /** @todo How does this code handle iReg==X86_GREG_xSP. How does a real CPU7913 * handle it, for that matter (Intel pseudo code hints that the popped7914 * value is incremented by the stack item size.) Test it, both encodings7915 * and all three register sizes. */7916 7912 switch (pIemCpu->enmEffOpSize) 7917 7913 { … … 7985 7981 { 7986 7982 IEMOP_MNEMONIC("pop rSP"); 7987 return FNIEMOP_CALL_1(iemOpCommonPopGReg, X86_GREG_xSP); 7983 if (pIemCpu->enmCpuMode == IEMMODE_64BIT) 7984 { 7985 if (pIemCpu->uRexB) 7986 return FNIEMOP_CALL_1(iemOpCommonPopGReg, X86_GREG_xSP); 7987 pIemCpu->enmDefOpSize = IEMMODE_64BIT; 7988 pIemCpu->enmEffOpSize = !(pIemCpu->fPrefixes & IEM_OP_PRF_SIZE_OP) ? IEMMODE_64BIT : IEMMODE_16BIT; 7989 } 7990 7991 IEMOP_HLP_DECODED_NL_1(OP_POP, IEMOPFORM_FIXED, OP_PARM_REG_ESP, 7992 DISOPTYPE_HARMLESS | DISOPTYPE_DEFAULT_64_OP_SIZE | DISOPTYPE_REXB_EXTENDS_OPREG); 7993 /** @todo add testcase for this instruction. */ 7994 switch (pIemCpu->enmEffOpSize) 7995 { 7996 case IEMMODE_16BIT: 7997 IEM_MC_BEGIN(0, 1); 7998 IEM_MC_LOCAL(uint16_t, u16Dst); 7999 IEM_MC_POP_U16(&u16Dst); /** @todo not correct MC, fix later. */ 8000 IEM_MC_STORE_GREG_U16(X86_GREG_xSP, u16Dst); 8001 IEM_MC_ADVANCE_RIP(); 8002 IEM_MC_END(); 8003 break; 8004 8005 case IEMMODE_32BIT: 8006 IEM_MC_BEGIN(0, 1); 8007 IEM_MC_LOCAL(uint32_t, u32Dst); 8008 IEM_MC_POP_U32(&u32Dst); 8009 IEM_MC_STORE_GREG_U32(X86_GREG_xSP, u32Dst); 8010 IEM_MC_ADVANCE_RIP(); 8011 IEM_MC_END(); 8012 break; 8013 8014 case IEMMODE_64BIT: 8015 IEM_MC_BEGIN(0, 1); 8016 IEM_MC_LOCAL(uint64_t, u64Dst); 8017 IEM_MC_POP_U64(&u64Dst); 8018 IEM_MC_STORE_GREG_U64(X86_GREG_xSP, u64Dst); 8019 IEM_MC_ADVANCE_RIP(); 8020 IEM_MC_END(); 8021 break; 8022 } 8023 8024 return VINF_SUCCESS; 7988 8025 } 7989 8026
Note:
See TracChangeset
for help on using the changeset viewer.