Changeset 97489 in vbox for trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-basic-2-x0.c
- Timestamp:
- Nov 9, 2022 9:15:54 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-basic-2-x0.c
r97477 r97489 3648 3648 PROTO_ALL(bs3CpuBasic2_call_jv__ud2); 3649 3649 PROTO_ALL(bs3CpuBasic2_call_jv_back__ud2); 3650 PROTO_ALL(bs3CpuBasic2_call_ind_mem__ud2); 3651 PROTO_ALL(bs3CpuBasic2_call_ind_xAX__ud2); 3652 PROTO_ALL(bs3CpuBasic2_call_ind_xDI__ud2); 3653 FNBS3FAR bs3CpuBasic2_call_ind_r9__ud2_c64; 3650 3654 3651 3655 PROTO_ALL(bs3CpuBasic2_jmp_opsize_begin); … … 3659 3663 PROTO_ALL(bs3CpuBasic2_call_jv_opsize__ud2); 3660 3664 PROTO_ALL(bs3CpuBasic2_call_jv_opsize_back__ud2); 3665 PROTO_ALL(bs3CpuBasic2_call_ind_mem_opsize__ud2); 3666 FNBS3FAR bs3CpuBasic2_call_ind_mem_opsize__ud2__intel_c64; 3667 PROTO_ALL(bs3CpuBasic2_call_ind_xAX_opsize__ud2); 3661 3668 PROTO_ALL(bs3CpuBasic2_jmp_opsize_end); 3662 3669 #undef PROTO_ALL … … 3669 3676 FNBS3FAR bs3CpuBasic2_jmp_jv16_wrap_forward__ud2; 3670 3677 FNBS3FAR bs3CpuBasic2_jmp_jv16_opsize_wrap_forward__ud2; 3678 FNBS3FAR bs3CpuBasic2_call_jv16_wrap_forward__ud2; 3679 FNBS3FAR bs3CpuBasic2_call_jv16_opsize_wrap_forward__ud2; 3671 3680 3672 3681 FNBS3FAR bs3CpuBasic2_jmp_target_wrap_backward; … … 3675 3684 FNBS3FAR bs3CpuBasic2_jmp_jv16_wrap_backward__ud2; 3676 3685 FNBS3FAR bs3CpuBasic2_jmp_jv16_opsize_wrap_backward__ud2; 3686 FNBS3FAR bs3CpuBasic2_call_jv16_wrap_backward__ud2; 3687 FNBS3FAR bs3CpuBasic2_call_jv16_opsize_wrap_backward__ud2; 3677 3688 3678 3689 … … 3743 3754 { 0, true, -1, true, bs3CpuBasic2_call_jv_opsize__ud2_c16, }, 3744 3755 { 0, true, -1, true, bs3CpuBasic2_call_jv_opsize_back__ud2_c16, }, 3756 { 0, false, -1, true, bs3CpuBasic2_call_ind_mem__ud2_c16, }, 3757 { 0, true, -1, true, bs3CpuBasic2_call_ind_mem_opsize__ud2_c16, }, 3758 { 0, false, X86_GREG_xAX, true, bs3CpuBasic2_call_ind_xAX__ud2_c16, }, 3759 { 0, false, X86_GREG_xDI, true, bs3CpuBasic2_call_ind_xDI__ud2_c16, }, 3760 { 0, true, X86_GREG_xAX, true, bs3CpuBasic2_call_ind_xAX_opsize__ud2_c16, }, 3745 3761 3746 3762 { -1, false, -1, false, bs3CpuBasic2_jmp_jb_wrap_backward__ud2, }, … … 3753 3769 { -1, true, -1, false, bs3CpuBasic2_jmp_jv16_opsize_wrap_backward__ud2, }, 3754 3770 { +1, true, -1, false, bs3CpuBasic2_jmp_jv16_opsize_wrap_forward__ud2, }, 3771 { -1, false, -1, true, bs3CpuBasic2_call_jv16_wrap_backward__ud2, }, 3772 { +1, false, -1, true, bs3CpuBasic2_call_jv16_wrap_forward__ud2, }, 3773 { -1, true, -1, true, bs3CpuBasic2_call_jv16_opsize_wrap_backward__ud2, }, 3774 { +1, true, -1, true, bs3CpuBasic2_call_jv16_opsize_wrap_forward__ud2, }, 3755 3775 }; 3756 3776 … … 3821 3841 } 3822 3842 3823 /* Limit the wraparound CS segment to ex lcude bs3CpuBasic2_jmp_target_wrap_backward3843 /* Limit the wraparound CS segment to exclude bs3CpuBasic2_jmp_target_wrap_backward 3824 3844 and run the backward wrapping tests. */ 3825 3845 if (!BS3_MODE_IS_RM_OR_V86(bMode)) 3826 3846 { 3827 3847 Bs3GdteSpare03.Gen.u16LimitLow = BS3_FP_OFF(bs3CpuBasic2_jmp_target_wrap_backward) - 1; 3828 CtxExpected.cs = Ctx.cs = BS3_SEL_SPARE_03; 3848 CtxExpected.cs = Ctx.cs = BS3_SEL_SPARE_03; 3849 CtxExpected.rsp.u = Ctx.rsp.u; 3829 3850 for (iTest = 0; iTest < RT_ELEMENTS(s_aTests); iTest++) 3830 3851 if (s_aTests[iTest].iWrap < 0) … … 3848 3869 else 3849 3870 CtxExpected.rip.u = BS3_FP_OFF(bs3CpuBasic2_jmp_target_wrap_backward); 3871 CtxExpected.rsp.u = Ctx.rsp.u; 3872 if (s_aTests[iTest].fCall && (s_aTests[iTest].iWrap == 0 || !s_aTests[iTest].fOpSizePfx)) 3873 CtxExpected.rsp.u -= s_aTests[iTest].fOpSizePfx ? 4 : 2; 3850 3874 //Bs3TestPrintf("cs:rip=%04RX16:%04RX64 v2\n", Ctx.cs, Ctx.rip.u); 3851 3875 Bs3TrapSetJmpAndRestore(&Ctx, &TrapCtx); … … 3893 3917 { 32, true, false, -1, true, bs3CpuBasic2_call_jv_opsize__ud2_c32, }, 3894 3918 { 32, true, false, -1, true, bs3CpuBasic2_call_jv_opsize_back__ud2_c32, }, 3919 { 32, false, false, -1, true, bs3CpuBasic2_call_ind_mem__ud2_c32, }, 3920 { 32, true, false, -1, true, bs3CpuBasic2_call_ind_mem_opsize__ud2_c32, }, 3921 { 32, false, false, X86_GREG_xAX, true, bs3CpuBasic2_call_ind_xAX__ud2_c32, }, 3922 { 32, false, false, X86_GREG_xDI, true, bs3CpuBasic2_call_ind_xDI__ud2_c32, }, 3923 { 32, true, false, X86_GREG_xAX, true, bs3CpuBasic2_call_ind_xAX_opsize__ud2_c32, }, 3895 3924 /* 64bit/Intel: Use the _c64 tests, which are written to ignore the o16 prefix. */ 3896 3925 { 64, false, true, -1, false, bs3CpuBasic2_jmp_jb__ud2_c64, }, … … 3912 3941 { 64, true, true, -1, true, bs3CpuBasic2_call_jv_opsize__ud2_c64, }, 3913 3942 { 64, true, true, -1, true, bs3CpuBasic2_call_jv_opsize_back__ud2_c64, }, 3943 { 64, false, true, -1, true, bs3CpuBasic2_call_ind_mem__ud2_c64, }, 3944 { 64, true, true, -1, true, bs3CpuBasic2_call_ind_mem_opsize__ud2__intel_c64,}, 3945 { 64, false, true, X86_GREG_xAX, true, bs3CpuBasic2_call_ind_xAX__ud2_c64, }, 3946 { 64, false, true, X86_GREG_xDI, true, bs3CpuBasic2_call_ind_xDI__ud2_c64, }, 3947 { 64, false, true, X86_GREG_x9, true, bs3CpuBasic2_call_ind_r9__ud2_c64, }, 3948 { 64, true, true, X86_GREG_xAX, true, bs3CpuBasic2_call_ind_xAX_opsize__ud2_c64, }, /* no intel version needed */ 3914 3949 /* 64bit/AMD: Use the _c32 tests. */ 3915 3950 { 64, false, false, -1, false, bs3CpuBasic2_jmp_jb__ud2_c32, }, … … 3922 3957 { 64, true, false, -1, false, bs3CpuBasic2_jmp_jv_opsize_back__ud2_c32, }, 3923 3958 { 64, false, false, -1, false, bs3CpuBasic2_jmp_ind_mem__ud2_c64, }, /* using c64 here */ 3924 { 64, true, false, -1, false, bs3CpuBasic2_jmp_ind_mem_opsize__ud2_c64, }, /* using c64 here*/3959 { 64, true, false, -1, false, bs3CpuBasic2_jmp_ind_mem_opsize__ud2_c64, }, /* ditto */ 3925 3960 { 64, false, false, X86_GREG_xAX, false, bs3CpuBasic2_jmp_ind_xAX__ud2_c64, }, /* ditto */ 3926 3961 { 64, false, false, X86_GREG_xDI, false, bs3CpuBasic2_jmp_ind_xDI__ud2_c64, }, /* ditto */ … … 3931 3966 { 64, true, false, -1, true, bs3CpuBasic2_call_jv_opsize__ud2_c32, }, 3932 3967 { 64, true, false, -1, true, bs3CpuBasic2_call_jv_opsize_back__ud2_c32, }, 3968 { 64, false, false, -1, true, bs3CpuBasic2_call_ind_mem__ud2_c64, }, /* using c64 here */ 3969 { 64, true, false, -1, true, bs3CpuBasic2_call_ind_mem_opsize__ud2_c64, }, /* ditto */ 3970 { 64, false, false, X86_GREG_xAX, true, bs3CpuBasic2_call_ind_xAX__ud2_c64, }, /* ditto */ 3971 { 64, false, false, X86_GREG_xDI, true, bs3CpuBasic2_call_ind_xDI__ud2_c64, }, /* ditto */ 3972 { 64, false, false, X86_GREG_x9, true, bs3CpuBasic2_call_ind_r9__ud2_c64, }, /* ditto */ 3973 { 64, true, false, X86_GREG_xAX, true, bs3CpuBasic2_call_ind_xAX_opsize__ud2_c64, }, /* ditto */ 3933 3974 }; 3934 3975 uint8_t const cBits = BS3_MODE_IS_64BIT_CODE(bMode) ? 64 : 32;
Note:
See TracChangeset
for help on using the changeset viewer.