Changeset 62455 in vbox for trunk/src/VBox/ValidationKit/bootsectors
- Timestamp:
- Jul 22, 2016 3:55:14 PM (8 years ago)
- Location:
- trunk/src/VBox/ValidationKit/bootsectors
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-instr-2-template.c
r62412 r62455 48 48 extern FNBS3FAR BS3_CMN_NM(bs3CpuInstr2_mul_xBX_ud2); 49 49 extern FNBS3FAR BS3_CMN_NM(bs3CpuInstr2_imul_xBX_ud2); 50 extern FNBS3FAR BS3_CMN_NM(bs3CpuInstr2_imul_xCX_xBX_ud2); 50 51 extern FNBS3FAR BS3_CMN_NM(bs3CpuInstr2_div_xBX_ud2); 51 52 extern FNBS3FAR BS3_CMN_NM(bs3CpuInstr2_idiv_xBX_ud2); … … 281 282 } 282 283 284 /* 285 * Repeat for the truncating two operand version. 286 */ 287 Bs3RegCtxSetRipCsFromCurPtr(&Ctx, BS3_CMN_NM(bs3CpuInstr2_imul_xCX_xBX_ud2)); 288 289 for (k = 0; k < 2; k++) 290 { 291 Ctx.rflags.u16 |= MUL_CHECK_EFLAGS | MUL_CHECK_EFLAGS_ZERO; 292 for (j = 0; j < 2; j++) 293 { 294 for (i = 0; i < RT_ELEMENTS(s_aTests); i++) 295 { 296 if (k == 0) 297 { 298 Ctx.rcx.RT_CONCAT(u,ARCH_BITS) = s_aTests[i].uInAX; 299 Ctx.rbx.RT_CONCAT(u,ARCH_BITS) = s_aTests[i].uInBX; 300 } 301 else 302 { 303 Ctx.rcx.RT_CONCAT(u,ARCH_BITS) = s_aTests[i].uInBX; 304 Ctx.rbx.RT_CONCAT(u,ARCH_BITS) = s_aTests[i].uInAX; 305 } 306 Bs3TrapSetJmpAndRestore(&Ctx, &TrapFrame); 307 if (TrapFrame.bXcpt != X86_XCPT_UD) 308 Bs3TestFailedF("Expected #UD got %#x", TrapFrame.bXcpt); 309 else if ( TrapFrame.Ctx.rcx.RT_CONCAT(u,ARCH_BITS) != s_aTests[i].uOutAX 310 || TrapFrame.Ctx.rdx.u != Ctx.rdx.u 311 || TrapFrame.Ctx.rbx.u != Ctx.rbx.u 312 || (TrapFrame.Ctx.rflags.u16 & (IMUL_CHECK_EFLAGS | IMUL_CHECK_EFLAGS_ZERO)) 313 != (s_aTests[i].fFlags & IMUL_CHECK_EFLAGS) ) 314 { 315 Bs3TestFailedF("test #%i failed: input %#" RTCCUINTREG_XFMT " * %#" RTCCUINTREG_XFMT, 316 i, s_aTests[i].uInAX, s_aTests[i].uInBX); 317 318 if (TrapFrame.Ctx.rcx.RT_CONCAT(u,ARCH_BITS) != s_aTests[i].uOutAX) 319 Bs3TestFailedF("Expected xAX = %#RX" RT_XSTR(ARCH_BITS) " got %#RX" RT_XSTR(ARCH_BITS), 320 s_aTests[i].uOutAX, TrapFrame.Ctx.rcx.RT_CONCAT(u,ARCH_BITS)); 321 if ( (TrapFrame.Ctx.rflags.u16 & (IMUL_CHECK_EFLAGS | IMUL_CHECK_EFLAGS_ZERO)) 322 != (s_aTests[i].fFlags & IMUL_CHECK_EFLAGS) ) 323 Bs3TestFailedF("Expected EFLAGS = %#06RX16, got %#06RX16", s_aTests[i].fFlags & IMUL_CHECK_EFLAGS, 324 TrapFrame.Ctx.rflags.u16 & (IMUL_CHECK_EFLAGS | IMUL_CHECK_EFLAGS_ZERO)); 325 } 326 } 327 } 328 } 329 283 330 return 0; 284 331 } -
trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-instr-2-template.mac
r62410 r62455 60 60 61 61 62 BS3_PROC_BEGIN_CMN bs3CpuInstr2_imul_xCX_xBX_ud2, BS3_PBC_NEAR 63 imul xCX, xBX 64 .again: 65 ud2 66 jmp .again 67 BS3_PROC_END_CMN bs3CpuInstr2_imul_xCX_xBX_ud2 68 69 62 70 BS3_PROC_BEGIN_CMN bs3CpuInstr2_div_xBX_ud2, BS3_PBC_NEAR 63 71 div xBX
Note:
See TracChangeset
for help on using the changeset viewer.