VirtualBox

Changeset 107278 in vbox for trunk/src/VBox/ValidationKit


Ignore:
Timestamp:
Dec 10, 2024 12:54:07 PM (5 weeks ago)
Author:
vboxsync
Message:

VMM/IEM: fix SSE cvtdq2pd raising spurious #GP; bugref:10816; jiraref:VBP-1476

  • improperly fixed with a cast; proper fix caused far too much cascading trouble
  • improve internal doc of various TODO_XXX_BUG stuff
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-instr-4.c32

    r107238 r107278  
    20922092        pCtx->cr0.u32 &= ~X86_CR0_TS;
    20932093
    2094     if (pConfig->fCr4OsFxSR)
    2095         pCtx->cr4.u32 |= X86_CR4_OSFXSR;
    2096     else
    2097         pCtx->cr4.u32 &= ~X86_CR4_OSFXSR;
    2098 
    20992094    if (pConfig->fCr4OsXmmExcpt && g_afTypeSupports[T_SSE])
    21002095        pCtx->cr4.u32 |= X86_CR4_OSXMMEEXCPT;
     
    32583253/** @todo 'master switch' turns on all IEM misbehaviors documented below */
    32593254#ifdef TODO_EXPOSE_IEM_ERRATA
    3260 # define TODO_X86_MXCSR_PE_IEM
    3261 # define TODO_X86_MXCSR_PE_IEM_SSE
    3262 # define TODO_X86_MXCSR_UE_IEM
    3263 # define TODO_CVTDQ2PD_M64_IEM
    3264 # define TODO_MXCSR_ORDER      /* (test harness issue, not IEM) */
     3255# define TODO_X86_MXCSR_PE_IEM       /* mul/div instructions: IEM fails to set X86_MXCSR_PE like HW does */
     3256# define TODO_X86_MXCSR_PE_IEM_SSE   /* sub/mul instructions: IEM fails to set X86_MXCSR_PE like HW does */
     3257# define TODO_X86_MXCSR_UE_IEM       /* various instructions: IEM fails to set X86_MXCSR_UE like HW does */
     3258# define TODO_IEM_ASM_COREDUMP       /* certain instructions dump core when x86-on-x86 IEM built *WITHOUT* IEM_WITHOUT_ASSEMBLY=1 */
     3259# define TODO_MXCSR_ORDER            /* (test harness issue, not IEM) */
     3260# undef  BS3_MXCSR_PE_FUZZY          /* most or all mentions of BS3_MXCSR_PE_FUZZY represent cases where */
     3261# define BS3_MXCSR_PE_FUZZY 0        /*    IEM behavior disagrees with hardware; they need investigation */
    32653262#endif /* TODO_EXPOSE_IEM_ERRATA */
    32663263
     
    2346223459    {
    2346323460        { BS3_INSTR4_ALL(cvtdq2pd_XMM1_XMM2),   255,             RM_REG,    T_SSE2,    XMM1, XMM2,  NOREG, 0, PASS_TEST_ARRAY(s_aValues) },
    23464 #ifdef TODO_CVTDQ2PD_M64_IEM /** @todo THIS FAILS ON IEM: unexpected #GP */
    2346523461        { BS3_INSTR4_ALL(cvtdq2pd_XMM1_FSxBX),  X86_XCPT_AC,     RM_MEM,    T_SSE2,    XMM1, FSxBX, NOREG, 0, PASS_TEST_ARRAY(s_aValues) },
    23466 #endif /* TODO_CVTDQ2PD_M64_IEM */
    2346723462
    2346823463        { BS3_INSTR4_ALL(vcvtdq2pd_XMM1_XMM2),  255,             RM_REG,    T_AVX_128, XMM1, XMM2,  NOREG, 0, PASS_TEST_ARRAY(s_aValues) },
     
    2347723472
    2347823473        { BS3_INSTR4_C64(cvtdq2pd_XMM8_XMM9),   255,             RM_REG,    T_SSE2,    XMM8, XMM9,  NOREG, 0, PASS_TEST_ARRAY(s_aValues) },
    23479 #ifdef TODO_CVTDQ2PD_M64_IEM /** @todo THIS FAILS ON IEM: unexpected #GP */
    2348023474        { BS3_INSTR4_C64(cvtdq2pd_XMM8_FSxBX),  X86_XCPT_AC,     RM_MEM,    T_SSE2,    XMM8, FSxBX, NOREG, 0, PASS_TEST_ARRAY(s_aValues) },
    23481 #endif /* TODO_CVTDQ2PD_M64_IEM */
    2348223475
    2348323476        { BS3_INSTR4_C64(vcvtdq2pd_XMM8_XMM9),  255,             RM_REG,    T_AVX_128, XMM8, XMM9,  NOREG, 0, PASS_TEST_ARRAY(s_aValues) },
     
    2487324866# endif /* BS3_CPU_INSTR_4 */
    2487424867# if defined(BS3_CPU_INSTR_5)
    24875         { "[v]rcpps",       bs3CpuInstr4_v_rcpps,     0 },
     24868#  ifdef TODO_IEM_ASM_COREDUMP
     24869        { "[v]rcpps",       bs3CpuInstr4_v_rcpps,     0 },  // COREDUMP in asm-iem
     24870#  endif /* TODO_IEM_ASM_COREDUMP */
    2487624871        { "[v]rcpss",       bs3CpuInstr4_v_rcpss,     0 },
    24877         { "[v]sqrtps",      bs3CpuInstr4_v_sqrtps,    0 },
    24878         { "[v]sqrtpd",      bs3CpuInstr4_v_sqrtpd,    0 },
     24872#  ifdef TODO_IEM_ASM_COREDUMP
     24873        { "[v]sqrtps",      bs3CpuInstr4_v_sqrtps,    0 },  // COREDUMP in asm-iem
     24874        { "[v]sqrtpd",      bs3CpuInstr4_v_sqrtpd,    0 },  // COREDUMP in asm-iem
     24875#  endif /* TODO_IEM_ASM_COREDUMP */
    2487924876        { "[v]sqrtss",      bs3CpuInstr4_v_sqrtss,    0 },
    2488024877        { "[v]sqrtsd",      bs3CpuInstr4_v_sqrtsd,    0 },
    24881         { "[v]rsqrtps",     bs3CpuInstr4_v_rsqrtps,   0 },
     24878#  ifdef TODO_IEM_ASM_COREDUMP
     24879        { "[v]rsqrtps",     bs3CpuInstr4_v_rsqrtps,   0 },  // COREDUMP in asm-iem
     24880#  endif /* TODO_IEM_ASM_COREDUMP */
    2488224881        { "[v]rsqrtss",     bs3CpuInstr4_v_rsqrtss,   0 },
    2488324882        { "[v]dpps",        bs3CpuInstr4_v_dpps,      0 },
     
    2490724906        { "[v]cvtsd2si",    bs3CpuInstr4_v_cvtsd2si,  0 },
    2490824907        { "[v]cvttsd2si",   bs3CpuInstr4_v_cvttsd2si, 0 },
    24909         { "[v]cvtdq2ps",    bs3CpuInstr4_v_cvtdq2ps,  0 },
    24910         { "[v]cvtps2dq",    bs3CpuInstr4_v_cvtps2dq,  0 },
    24911         { "[v]cvttps2dq",   bs3CpuInstr4_v_cvttps2dq, 0 },
     24908#  ifdef TODO_IEM_ASM_COREDUMP
     24909        { "[v]cvtdq2ps",    bs3CpuInstr4_v_cvtdq2ps,  0 },  // COREDUMP in asm-iem
     24910        { "[v]cvtps2dq",    bs3CpuInstr4_v_cvtps2dq,  0 },  // COREDUMP in asm-iem
     24911        { "[v]cvttps2dq",   bs3CpuInstr4_v_cvttps2dq, 0 },  // COREDUMP in asm-iem
     24912#  endif /* TODO_IEM_ASM_COREDUMP */
    2491224913        { "[v]cvtdq2pd",    bs3CpuInstr4_v_cvtdq2pd,  0 },
    2491324914        { "[v]cvtpd2dq",    bs3CpuInstr4_v_cvtpd2dq,  0 },
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette