- Timestamp:
- Feb 7, 2012 9:50:43 PM (13 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllInstructions.cpp.h
r40022 r40024 10003 10003 case 5: pImpl = &g_iemAImpl_shr; IEMOP_MNEMONIC("shr Eb,CL"); break; 10004 10004 case 7: pImpl = &g_iemAImpl_sar; IEMOP_MNEMONIC("sar Eb,CL"); break; 10005 case 6: return IEMOP_RAISE_INVALID_ LOCK_PREFIX();10005 case 6: return IEMOP_RAISE_INVALID_OPCODE(); 10006 10006 IEM_NOT_REACHED_DEFAULT_CASE_RET(); /* gcc, grr. */ 10007 10007 } … … 10383 10383 /** Opcode 0xdc. */ 10384 10384 FNIEMOP_STUB(iemOp_EscF4); 10385 10386 #if 0 10387 /** Opcode 0xdd /0 mem32real */ 10388 FNIEMOP_STUB_1(iemOp_fld_m32r, uint8_t, bRm); 10389 10390 /** Opcode 0xdd /0 stN */ 10391 FNIEMOP_STUB_1(iemOp_fld_stN, uint8_t, bRm); 10392 10393 /** Opcode 0xdd /1 stN */ 10394 FNIEMOP_STUB_1(iemOp_fst_m32r, uint8_t, bRm); 10395 10396 /** Opcode 0xdd /2 mem32real */ 10397 FNIEMOP_STUB_1(iemOp_fst_m32r, uint8_t, bRm); 10398 10399 /** Opcode 0xdd /3 */ 10400 FNIEMOP_STUB_1(iemOp_fstp_m32r, uint8_t, bRm); 10401 10402 /** Opcode 0xdd /4 */ 10403 FNIEMOP_STUB_1(iemOp_fldenv, uint8_t, bRm); 10404 10405 /** Opcode 0xdd /5 */ 10406 FNIEMOP_STUB_1(iemOp_fldcw, uint8_t, bRm); 10407 10408 /** Opcode 0xdd /6 */ 10409 FNIEMOP_STUB_1(iemOp_fstenv, uint8_t, bRm); 10410 10411 /** Opcode 0xdd /7 */ 10412 FNIEMOP_STUB_1(iemOp_fstcw, uint8_t, bRm); 10413 10414 /** Opcode 0xdd 0xc9, 0xdd 0xd8-0xdf. */ 10415 FNIEMOP_STUB(iemOp_fnop); 10416 10417 10385 10418 /** Opcode 0xdd. */ 10419 FNIEMOP_DEF(iemOp_EscF5) 10420 { 10421 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 10422 if ((bRm & X86_MODRM_MOD_MASK) == (3 << X86_MODRM_MOD_SHIFT)) 10423 { 10424 switch ((bRm >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK) 10425 { 10426 case 0: return FNIEMOP_CALL_1(iemOp_fld_stX, bRm); 10427 case 1: return FNIEMOP_CALL_1(iemOp_fxch_stX, bRm); 10428 case 2: 10429 if (bRm == 0xc9) 10430 return FNIEMOP_CALL(iemOp_fnop); 10431 return IEMOP_RAISE_INVALID_OPCODE(); 10432 case 3: return FNIEMOP_CALL(iemOp_fnop); /* AMD says reserved; tests on intel indicates FNOP. */ 10433 case 4: 10434 case 5: 10435 case 6: 10436 case 7: 10437 IEM_NOT_REACHED_DEFAULT_CASE_RET(); 10438 } 10439 10440 } 10441 else 10442 { 10443 switch ((bRm >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK) 10444 { 10445 case 0: return FNIEMOP_CALL_1(iemOp_fld_m32r, bRm); 10446 case 1: return IEMOP_RAISE_INVALID_OPCODE(); /** @todo Check if 0xdd /1 is a valid instruction which does/did something. */ 10447 case 2: return FNIEMOP_CALL_1(iemOp_fst_m32r, bRm); 10448 case 3: return FNIEMOP_CALL_1(iemOp_fstp_m32r, bRm); 10449 case 4: return FNIEMOP_CALL_1(iemOp_fldenv, bRm); 10450 case 5: return FNIEMOP_CALL_1(iemOp_fldcw, bRm); 10451 case 6: return FNIEMOP_CALL_1(iemOp_fstenv, bRm); 10452 case 7: return FNIEMOP_CALL_1(iemOp_fstcw, bRm); 10453 IEM_NOT_REACHED_DEFAULT_CASE_RET(); 10454 } 10455 } 10456 } 10457 #else 10386 10458 FNIEMOP_STUB(iemOp_EscF5); 10459 #endif 10460 10387 10461 10388 10462 /** Opcode 0xde 0xd9. */ -
trunk/src/VBox/VMM/testcase/tstX86-1.cpp
r40001 r40024 70 70 DECLASM(int32_t) x861_Test3(void); 71 71 DECLASM(int32_t) x861_Test4(void); 72 DECLASM(int32_t) x861_Test5(void); 72 73 73 74 … … 217 218 */ 218 219 int32_t rc; 219 #if 1220 #if 0 220 221 RTTestSub(hTest, "Misc 1"); 221 222 rc = x861_Test1(); … … 232 233 if (rc != 0) 233 234 RTTestFailed(hTest, "x861_Test3 -> %d", rc); 234 #endif235 235 RTTestSub(hTest, "Multibyte NOPs"); 236 236 rc = x861_Test4(); 237 237 if (rc != 0) 238 238 RTTestFailed(hTest, "x861_Test4 -> %d", rc); 239 RTTestSub(hTest, "Odd floating point encodings"); 240 #endif 241 rc = x861_Test5(); 242 if (rc != 0) 243 RTTestFailed(hTest, "x861_Test5 -> %d", rc); 239 244 } 240 245 -
trunk/src/VBox/VMM/testcase/tstX86-1A.asm
r40008 r40024 1277 1277 ENDPROC x861_Test4 1278 1278 1279 1280 1281 ;; 1282 ; Tests some odd floating point instruction encodings. 1283 ; 1284 BEGINPROC x861_Test5 1285 SAVE_ALL_PROLOGUE 1286 1287 ; standard stuff... 1288 fld dword [.r32V1] 1289 fld qword [.r64V1] 1290 fld tword [.r80V1] 1291 1292 ShouldTrap X86_XCPT_UD, db 0d9h, 008h 1293 ShouldTrap X86_XCPT_UD, db 0d9h, 009h 1294 ShouldTrap X86_XCPT_UD, db 0d9h, 00ah 1295 ShouldTrap X86_XCPT_UD, db 0d9h, 00bh 1296 ShouldTrap X86_XCPT_UD, db 0d9h, 00ch 1297 ShouldTrap X86_XCPT_UD, db 0d9h, 00dh 1298 ShouldTrap X86_XCPT_UD, db 0d9h, 00eh 1299 ShouldTrap X86_XCPT_UD, db 0d9h, 00fh 1300 1301 ShouldTrap X86_XCPT_UD, db 0d9h, 0d1h 1302 ShouldTrap X86_XCPT_UD, db 0d9h, 0d2h 1303 ShouldTrap X86_XCPT_UD, db 0d9h, 0d3h 1304 ShouldTrap X86_XCPT_UD, db 0d9h, 0d4h 1305 ShouldTrap X86_XCPT_UD, db 0d9h, 0d5h 1306 ShouldTrap X86_XCPT_UD, db 0d9h, 0d6h 1307 ShouldTrap X86_XCPT_UD, db 0d9h, 0d7h 1308 db 0d9h, 0d8h ; fnop? 1309 db 0d9h, 0d9h ; fnop? 1310 db 0d9h, 0dah ; fnop? 1311 db 0d9h, 0dbh ; fnop? 1312 db 0d9h, 0dch ; fnop? 1313 db 0d9h, 0ddh ; fnop? 1314 db 0d9h, 0deh ; fnop? 1315 db 0d9h, 0dfh ; fnop? 1316 ShouldTrap X86_XCPT_UD, db 0d9h, 0e2h 1317 ShouldTrap X86_XCPT_UD, db 0d9h, 0e3h 1318 ShouldTrap X86_XCPT_UD, db 0d9h, 0e6h 1319 ShouldTrap X86_XCPT_UD, db 0d9h, 0e7h 1320 ShouldTrap X86_XCPT_UD, db 0d9h, 0efh 1321 1322 1323 .success: 1324 xor eax, eax 1325 .return: 1326 SAVE_ALL_EPILOGUE 1327 ret 1328 1329 .r32V1: dd 3.2 1330 .r64V1: dq 6.4 1331 .r80V1: dt 8.0 1332 1333 ENDPROC x861_Test5 1334 1335 1279 1336 ;; 1280 1337 ; Terminate the trap info array with a NIL entry.
Note:
See TracChangeset
for help on using the changeset viewer.