Changeset 38073 in vbox for trunk/src/VBox/VMM/VMMAll
- Timestamp:
- Jul 19, 2011 3:28:21 PM (13 years ago)
- Location:
- trunk/src/VBox/VMM/VMMAll
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAll.cpp
r38018 r38073 4693 4693 #define IEM_MC_SHL_LOCAL_S32(a_i32Local, a_cShift) do { (a_i32Local) <<= (a_cShift); } while (0) 4694 4694 #define IEM_MC_SHL_LOCAL_S64(a_i64Local, a_cShift) do { (a_i64Local) <<= (a_cShift); } while (0) 4695 4696 #define IEM_MC_AND_GREG_U8(a_iGReg, a_u8Value) *(uint8_t *)iemGRegRef(pIemCpu, (a_iGReg)) &= (a_u8Value) 4697 #define IEM_MC_AND_GREG_U16(a_iGReg, a_u16Value) *(uint16_t *)iemGRegRef(pIemCpu, (a_iGReg)) &= (a_u16Value) 4698 #define IEM_MC_AND_GREG_U32(a_iGReg, a_u32Value) \ 4699 do { \ 4700 uint32_t *pu32Reg = (uint32_t *)iemGRegRef(pIemCpu, (a_iGReg)); \ 4701 *pu32Reg &= (a_u32Value); \ 4702 pu32Reg[1] = 0; /* implicitly clear the high bit. */ \ 4703 } while (0) 4704 #define IEM_MC_AND_GREG_U64(a_iGReg, a_u64Value) *(uint64_t *)iemGRegRef(pIemCpu, (a_iGReg)) &= (a_u64Value) 4705 4706 #define IEM_MC_OR_GREG_U8(a_iGReg, a_u8Value) *(uint8_t *)iemGRegRef(pIemCpu, (a_iGReg)) |= (a_u8Value) 4707 #define IEM_MC_OR_GREG_U16(a_iGReg, a_u16Value) *(uint16_t *)iemGRegRef(pIemCpu, (a_iGReg)) |= (a_u16Value) 4708 #define IEM_MC_OR_GREG_U32(a_iGReg, a_u32Value) \ 4709 do { \ 4710 uint32_t *pu32Reg = (uint32_t *)iemGRegRef(pIemCpu, (a_iGReg)); \ 4711 *pu32Reg |= (a_u32Value); \ 4712 pu32Reg[1] = 0; /* implicitly clear the high bit. */ \ 4713 } while (0) 4714 #define IEM_MC_OR_GREG_U64(a_iGReg, a_u64Value) *(uint64_t *)iemGRegRef(pIemCpu, (a_iGReg)) |= (a_u64Value) 4695 4715 4696 4716 -
trunk/src/VBox/VMM/VMMAll/IEMAllInstructions.cpp.h
r37934 r38073 7687 7687 7688 7688 /** Opcode 0x98. */ 7689 FNIEMOP_STUB(iemOp_cbw); 7689 FNIEMOP_DEF(iemOp_cbw) 7690 { 7691 IEMOP_HLP_NO_LOCK_PREFIX(); 7692 switch (pIemCpu->enmEffOpSize) 7693 { 7694 case IEMMODE_16BIT: 7695 IEMOP_MNEMONIC("cbw"); 7696 IEM_MC_BEGIN(0, 1); 7697 IEM_MC_IF_GREG_BIT_SET(X86_GREG_xAX, 7) { 7698 IEM_MC_OR_GREG_U16(X86_GREG_xAX, UINT16_C(0xff00)); 7699 } IEM_MC_ELSE() { 7700 IEM_MC_AND_GREG_U16(X86_GREG_xAX, UINT16_C(0x00ff)); 7701 } IEM_MC_ENDIF(); 7702 IEM_MC_ADVANCE_RIP(); 7703 IEM_MC_END(); 7704 return VINF_SUCCESS; 7705 7706 case IEMMODE_32BIT: 7707 IEMOP_MNEMONIC("cwde"); 7708 IEM_MC_BEGIN(0, 1); 7709 IEM_MC_IF_GREG_BIT_SET(X86_GREG_xAX, 15) { 7710 IEM_MC_OR_GREG_U32(X86_GREG_xAX, UINT32_C(0xffff0000)); 7711 } IEM_MC_ELSE() { 7712 IEM_MC_AND_GREG_U32(X86_GREG_xAX, UINT32_C(0x0000ffff)); 7713 } IEM_MC_ENDIF(); 7714 IEM_MC_ADVANCE_RIP(); 7715 IEM_MC_END(); 7716 return VINF_SUCCESS; 7717 7718 case IEMMODE_64BIT: 7719 IEMOP_MNEMONIC("cdqe"); 7720 IEM_MC_BEGIN(0, 1); 7721 IEM_MC_IF_GREG_BIT_SET(X86_GREG_xAX, 31) { 7722 IEM_MC_OR_GREG_U64(X86_GREG_xAX, UINT64_C(0xffffffff00000000)); 7723 } IEM_MC_ELSE() { 7724 IEM_MC_AND_GREG_U64(X86_GREG_xAX, UINT64_C(0x00000000ffffffff)); 7725 } IEM_MC_ENDIF(); 7726 IEM_MC_ADVANCE_RIP(); 7727 IEM_MC_END(); 7728 return VINF_SUCCESS; 7729 7730 IEM_NOT_REACHED_DEFAULT_CASE_RET(); 7731 } 7732 } 7690 7733 7691 7734 … … 7709 7752 7710 7753 case IEMMODE_32BIT: 7711 IEMOP_MNEMONIC("c wq");7754 IEMOP_MNEMONIC("cdq"); 7712 7755 IEM_MC_BEGIN(0, 1); 7713 7756 IEM_MC_IF_GREG_BIT_SET(X86_GREG_xAX, 31) {
Note:
See TracChangeset
for help on using the changeset viewer.