VirtualBox

Changeset 103811 in vbox


Ignore:
Timestamp:
Mar 12, 2024 9:45:22 PM (10 months ago)
Author:
vboxsync
Message:

VMM/IEM: Fix the SIMD register check code on amd64, bugref:10614

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/IEMAllN8veRecompiler.cpp

    r103807 r103811  
    59805980    /* pcmpeqq vectmp0, [gstreg] (ASSUMES SSE4.1) */
    59815981    pbCodeBuf[off++] = X86_OP_PRF_SIZE_OP;
    5982     if (idxSimdReg >= 8)
     5982    if (IEMNATIVE_SIMD_REG_FIXED_TMP0 >= 8)
    59835983        pbCodeBuf[off++] = X86_OP_REX_R;
    59845984    pbCodeBuf[off++] = 0x0f;
    59855985    pbCodeBuf[off++] = 0x38;
    59865986    pbCodeBuf[off++] = 0x29;
    5987     off = iemNativeEmitGprByVCpuDisp(pbCodeBuf, off, idxSimdReg, g_aGstSimdShadowInfo[enmGstSimdReg].offXmm);
     5987    off = iemNativeEmitGprByVCpuDisp(pbCodeBuf, off, IEMNATIVE_SIMD_REG_FIXED_TMP0, g_aGstSimdShadowInfo[enmGstSimdReg].offXmm);
    59885988
    59895989    /* pextrq tmp0, vectmp0, #0 (ASSUMES SSE4.1). */
     
    59985998    pbCodeBuf[off++] = 0x00;
    59995999
    6000     /* test tmp0, 0xffffffff. */
     6000    /* cmp tmp0, 0xffffffffffffffff. */
    60016001    pbCodeBuf[off++] = X86_OP_REX_W | (IEMNATIVE_REG_FIXED_TMP0 < 8 ? 0 : X86_OP_REX_B);
    6002     pbCodeBuf[off++] = 0xf7;
    6003     pbCodeBuf[off++] = X86_MODRM_MAKE(X86_MOD_REG, 0, IEMNATIVE_REG_FIXED_TMP0 & 7);
    6004     pbCodeBuf[off++] = 0xff;
    6005     pbCodeBuf[off++] = 0xff;
    6006     pbCodeBuf[off++] = 0xff;
     6002    pbCodeBuf[off++] = 0x83;
     6003    pbCodeBuf[off++] = X86_MODRM_MAKE(X86_MOD_REG, 7, IEMNATIVE_REG_FIXED_TMP0 & 7);
    60076004    pbCodeBuf[off++] = 0xff;
    60086005
     
    60256022    pbCodeBuf[off++] = 0x01;
    60266023
    6027     /* test tmp0, 0xffffffff. */
     6024    /* cmp tmp0, 0xffffffffffffffff. */
    60286025    pbCodeBuf[off++] = X86_OP_REX_W | (IEMNATIVE_REG_FIXED_TMP0 < 8 ? 0 : X86_OP_REX_B);
    6029     pbCodeBuf[off++] = 0xf7;
    6030     pbCodeBuf[off++] = X86_MODRM_MAKE(X86_MOD_REG, 0, IEMNATIVE_REG_FIXED_TMP0 & 7);
    6031     pbCodeBuf[off++] = 0xff;
    6032     pbCodeBuf[off++] = 0xff;
    6033     pbCodeBuf[off++] = 0xff;
     6026    pbCodeBuf[off++] = 0x83;
     6027    pbCodeBuf[off++] = X86_MODRM_MAKE(X86_MOD_REG, 7, IEMNATIVE_REG_FIXED_TMP0 & 7);
    60346028    pbCodeBuf[off++] = 0xff;
    60356029
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