Changeset 36828 in vbox
- Timestamp:
- Apr 23, 2011 11:17:21 PM (14 years ago)
- Location:
- trunk/src/VBox/VMM/VMMAll
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAll.cpp
r36823 r36828 1275 1275 * 1276 1276 */ 1277 #include <iprt/mem.h> 1278 1279 /** 1280 * Used to add extra details about a stub case. 1281 * @param pIemCpu The IEM per CPU state. 1282 */ 1283 static void iemOpStubMsg2(PIEMCPU pIemCpu) 1284 { 1285 PVM pVM = IEMCPU_TO_VM(pIemCpu); 1286 PVMCPU pVCpu = IEMCPU_TO_VMCPU(pIemCpu); 1287 char szRegs[4096]; 1288 DBGFR3RegPrintf(pVM, pVCpu->idCpu, &szRegs[0], sizeof(szRegs), 1289 "rax=%016VR{rax} rbx=%016VR{rbx} rcx=%016VR{rcx} rdx=%016VR{rdx}\n" 1290 "rsi=%016VR{rsi} rdi=%016VR{rdi} r8 =%016VR{r8} r9 =%016VR{r9}\n" 1291 "r10=%016VR{r10} r11=%016VR{r11} r12=%016VR{r12} r13=%016VR{r13}\n" 1292 "r14=%016VR{r14} r15=%016VR{r15} %VRF{rflags}\n" 1293 "rip=%016VR{rip} rsp=%016VR{rsp} rbp=%016VR{rbp}\n" 1294 "cs={%04VR{cs} base=%016VR{cs_base} limit=%08VR{cs_lim} flags=%04VR{cs_attr}} cr0=%016VR{cr0}\n" 1295 "ds={%04VR{ds} base=%016VR{ds_base} limit=%08VR{ds_lim} flags=%04VR{ds_attr}} cr2=%016VR{cr2}\n" 1296 "es={%04VR{es} base=%016VR{es_base} limit=%08VR{es_lim} flags=%04VR{es_attr}} cr3=%016VR{cr3}\n" 1297 "fs={%04VR{fs} base=%016VR{fs_base} limit=%08VR{fs_lim} flags=%04VR{fs_attr}} cr4=%016VR{cr4}\n" 1298 "gs={%04VR{gs} base=%016VR{gs_base} limit=%08VR{gs_lim} flags=%04VR{gs_attr}} cr8=%016VR{cr8}\n" 1299 "ss={%04VR{ss} base=%016VR{ss_base} limit=%08VR{ss_lim} flags=%04VR{ss_attr}}\n" 1300 "dr0=%016VR{dr0} dr1=%016VR{dr1} dr2=%016VR{dr2} dr3=%016VR{dr3}\n" 1301 "dr6=%016VR{dr6} dr7=%016VR{dr7}\n" 1302 "gdtr=%016VR{gdtr_base}:%04VR{gdtr_lim} idtr=%016VR{idtr_base}:%04VR{idtr_lim} rflags=%08VR{rflags}\n" 1303 "ldtr={%04VR{ldtr} base=%016VR{ldtr_base} limit=%08VR{ldtr_lim} flags=%08VR{ldtr_attr}}\n" 1304 "tr ={%04VR{tr} base=%016VR{tr_base} limit=%08VR{tr_lim} flags=%08VR{tr_attr}}\n" 1305 " sysenter={cs=%04VR{sysenter_cs} eip=%08VR{sysenter_eip} esp=%08VR{sysenter_esp}}\n" 1306 " efer=%016VR{efer}\n" 1307 " pat=%016VR{pat}\n" 1308 " sf_mask=%016VR{sf_mask}\n" 1309 "krnl_gs_base=%016VR{krnl_gs_base}\n" 1310 " lstar=%016VR{lstar}\n" 1311 " star=%016VR{star} cstar=%016VR{cstar}\n" 1312 "fcw=%04VR{fcw} fsw=%04VR{fsw} ftw=%04VR{ftw} mxcsr=%04VR{mxcsr} mxcsr_mask=%04VR{mxcsr_mask}\n" 1313 ); 1314 1315 char szInstr[256]; 1316 DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, 0, 0, 1317 DBGF_DISAS_FLAGS_CURRENT_GUEST | DBGF_DISAS_FLAGS_DEFAULT_MODE, 1318 szInstr, sizeof(szInstr), NULL); 1319 1320 RTAssertMsg2Weak("%s%s\n", szRegs, szInstr); 1321 } 1322 1277 1323 1278 1324 /** Stubs an opcode. */ … … 1280 1326 FNIEMOP_DEF(a_Name) \ 1281 1327 { \ 1282 IEMOP_MNEMONIC(#a_Name); \ 1283 AssertMsgFailed(("After %d instructions\n", pIemCpu->cInstructions)); \ 1328 RTAssertMsg1(NULL, __LINE__, __FILE__, __FUNCTION__); \ 1329 iemOpStubMsg2(pIemCpu); \ 1330 RTAssertPanic(); \ 1284 1331 return VERR_NOT_IMPLEMENTED; \ 1285 1332 } \ … … 5661 5708 } while (0) 5662 5709 #define IEM_MC_SUB_GREG_U64(a_iGReg, a_u64Value) *(uint64_t *)iemGRegRef(pIemCpu, (a_iGReg)) -= (a_u64Value) 5710 5711 #define IEM_MC_ADD_GREG_U8_TO_LOCAL(a_u16Value, a_iGReg) (a_u8Value) += iemGRegFetchU8( pIemCpu, (a_iGReg)) 5712 #define IEM_MC_ADD_GREG_U16_TO_LOCAL(a_u16Value, a_iGReg) (a_u16Value) += iemGRegFetchU16(pIemCpu, (a_iGReg)) 5713 #define IEM_MC_ADD_GREG_U32_TO_LOCAL(a_u32Value, a_iGReg) (a_u32Value) += iemGRegFetchU32(pIemCpu, (a_iGReg)) 5714 #define IEM_MC_ADD_GREG_U64_TO_LOCAL(a_u64Value, a_iGReg) (a_u64Value) += iemGRegFetchU64(pIemCpu, (a_iGReg)) 5715 5663 5716 5664 5717 #define IEM_MC_SET_EFL_BIT(a_fBit) do { (pIemCpu)->CTX_SUFF(pCtx)->eflags.u |= (a_fBit); } while (0) -
trunk/src/VBox/VMM/VMMAll/IEMAllInstructions.cpp.h
r36821 r36828 7258 7258 /** Opcode 0xd5. */ 7259 7259 FNIEMOP_STUB(iemOp_aad_Ib); 7260 7261 7260 7262 /** Opcode 0xd7. */ 7261 FNIEMOP_STUB(iemOp_xlat); 7263 FNIEMOP_DEF(iemOp_xlat) 7264 { 7265 IEMOP_HLP_NO_LOCK_PREFIX(); 7266 switch (pIemCpu->enmEffAddrMode) 7267 { 7268 case IEMMODE_16BIT: 7269 IEM_MC_BEGIN(2, 0); 7270 IEM_MC_LOCAL(uint8_t, u8Tmp); 7271 IEM_MC_LOCAL(uint16_t, u16Addr); 7272 IEM_MC_FETCH_GREG_U8_ZX_U16(u16Addr, X86_GREG_xAX); 7273 IEM_MC_ADD_GREG_U16_TO_LOCAL(u16Addr, X86_GREG_xBX); 7274 IEM_MC_FETCH_MEM_U8(u8Tmp, pIemCpu->iEffSeg, u16Addr); 7275 IEM_MC_STORE_GREG_U8(X86_GREG_xAX, u8Tmp); 7276 IEM_MC_ADVANCE_RIP(); 7277 IEM_MC_END(); 7278 return VINF_SUCCESS; 7279 7280 case IEMMODE_32BIT: 7281 IEM_MC_BEGIN(2, 0); 7282 IEM_MC_LOCAL(uint8_t, u8Tmp); 7283 IEM_MC_LOCAL(uint32_t, u32Addr); 7284 IEM_MC_FETCH_GREG_U8_ZX_U32(u32Addr, X86_GREG_xAX); 7285 IEM_MC_ADD_GREG_U32_TO_LOCAL(u32Addr, X86_GREG_xBX); 7286 IEM_MC_FETCH_MEM_U8(u8Tmp, pIemCpu->iEffSeg, u32Addr); 7287 IEM_MC_STORE_GREG_U8(X86_GREG_xAX, u8Tmp); 7288 IEM_MC_ADVANCE_RIP(); 7289 IEM_MC_END(); 7290 return VINF_SUCCESS; 7291 7292 case IEMMODE_64BIT: 7293 IEM_MC_BEGIN(2, 0); 7294 IEM_MC_LOCAL(uint8_t, u8Tmp); 7295 IEM_MC_LOCAL(uint64_t, u64Addr); 7296 IEM_MC_FETCH_GREG_U8_ZX_U64(u64Addr, X86_GREG_xAX); 7297 IEM_MC_ADD_GREG_U64_TO_LOCAL(u64Addr, X86_GREG_xBX); 7298 IEM_MC_FETCH_MEM_U8(u8Tmp, pIemCpu->iEffSeg, u64Addr); 7299 IEM_MC_STORE_GREG_U8(X86_GREG_xAX, u8Tmp); 7300 IEM_MC_ADVANCE_RIP(); 7301 IEM_MC_END(); 7302 return VINF_SUCCESS; 7303 7304 IEM_NOT_REACHED_DEFAULT_CASE_RET(); 7305 } 7306 } 7307 7308 7262 7309 /** Opcode 0xd8. */ 7263 7310 FNIEMOP_STUB(iemOp_EscF0);
Note:
See TracChangeset
for help on using the changeset viewer.