VirtualBox

Ignore:
Timestamp:
Feb 7, 2024 3:07:09 PM (13 months ago)
Author:
vboxsync
Message:

VMM/IEM: Fix regression causing alignment exceptions for SSE/AVX based unaligned data fetches and stores which are handled fine on real hardware, bugref:9898

File:
1 edited

Legend:

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

    r103212 r103256  
    547547
    548548/** Body for the vpmov{s,z}x* instructions. */
    549 #define IEMOP_BODY_VPMOV_S_Z(a_Instr, a_SrcWidth) \
     549#define IEMOP_BODY_VPMOV_S_Z(a_Instr, a_SrcWidth, a_VexLengthMemFetch) \
    550550    uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); \
    551551    if (IEM_IS_MODRM_REG_MODE(bRm)) \
     
    606606            IEM_MC_MAYBE_RAISE_AVX_RELATED_XCPT(); \
    607607            IEM_MC_PREPARE_AVX_USAGE(); \
    608             IEM_MC_FETCH_MEM_U128(uSrc, pVCpu->iem.s.iEffSeg, GCPtrEffSrc); \
     608            a_VexLengthMemFetch(uSrc, pVCpu->iem.s.iEffSeg, GCPtrEffSrc); \
    609609            IEM_MC_CALL_VOID_AIMPL_2(IEM_SELECT_HOST_OR_FALLBACK(fAvx2, iemAImpl_ ## a_Instr ## _u256, \
    610610                                                                 iemAImpl_ ## a_Instr ## _u256_fallback), \
     
    641641     /** @todo r=aeichner Review code, the naming of this function and the parameter type specifiers. */
    642642    IEMOP_MNEMONIC2(VEX_RM, VPMOVSXBW, vpmovsxbw, Vx, Wq, DISOPTYPE_HARMLESS, 0);
    643     IEMOP_BODY_VPMOV_S_Z(vpmovsxbw, 64);
     643    IEMOP_BODY_VPMOV_S_Z(vpmovsxbw, 64, IEM_MC_FETCH_MEM_U128_NO_AC);
    644644}
    645645
     
    650650     /** @todo r=aeichner Review code, the naming of this function and the parameter type specifiers. */
    651651    IEMOP_MNEMONIC2(VEX_RM, VPMOVSXBD, vpmovsxbd, Vx, Wq, DISOPTYPE_HARMLESS, 0);
    652     IEMOP_BODY_VPMOV_S_Z(vpmovsxbd, 32);
     652    IEMOP_BODY_VPMOV_S_Z(vpmovsxbd, 32, IEM_MC_FETCH_MEM_U128);
    653653}
    654654
     
    659659     /** @todo r=aeichner Review code, the naming of this function and the parameter type specifiers. */
    660660    IEMOP_MNEMONIC2(VEX_RM, VPMOVSXBQ, vpmovsxbq, Vx, Wq, DISOPTYPE_HARMLESS, 0);
    661     IEMOP_BODY_VPMOV_S_Z(vpmovsxbq, 16);
     661    IEMOP_BODY_VPMOV_S_Z(vpmovsxbq, 16, IEM_MC_FETCH_MEM_U128);
    662662}
    663663
     
    668668     /** @todo r=aeichner Review code, the naming of this function and the parameter type specifiers. */
    669669    IEMOP_MNEMONIC2(VEX_RM, VPMOVSXWD, vpmovsxwd, Vx, Wq, DISOPTYPE_HARMLESS, 0);
    670     IEMOP_BODY_VPMOV_S_Z(vpmovsxwd, 64);
     670    IEMOP_BODY_VPMOV_S_Z(vpmovsxwd, 64, IEM_MC_FETCH_MEM_U128_NO_AC);
    671671}
    672672
     
    677677     /** @todo r=aeichner Review code, the naming of this function and the parameter type specifiers. */
    678678    IEMOP_MNEMONIC2(VEX_RM, VPMOVSXWQ, vpmovsxwq, Vx, Wq, DISOPTYPE_HARMLESS, 0);
    679     IEMOP_BODY_VPMOV_S_Z(vpmovsxwq, 32);
     679    IEMOP_BODY_VPMOV_S_Z(vpmovsxwq, 32, IEM_MC_FETCH_MEM_U128);
    680680}
    681681
     
    686686     /** @todo r=aeichner Review code, the naming of this function and the parameter type specifiers. */
    687687    IEMOP_MNEMONIC2(VEX_RM, VPMOVSXDQ, vpmovsxdq, Vx, Wq, DISOPTYPE_HARMLESS, 0);
    688     IEMOP_BODY_VPMOV_S_Z(vpmovsxdq, 64);
     688    IEMOP_BODY_VPMOV_S_Z(vpmovsxdq, 64, IEM_MC_FETCH_MEM_U128_NO_AC);
    689689}
    690690
     
    820820     /** @todo r=aeichner Review code, the naming of this function and the parameter type specifiers. */
    821821    IEMOP_MNEMONIC2(VEX_RM, VPMOVZXBW, vpmovzxbw, Vx, Wq, DISOPTYPE_HARMLESS, 0);
    822     IEMOP_BODY_VPMOV_S_Z(vpmovzxbw, 64);
     822    IEMOP_BODY_VPMOV_S_Z(vpmovzxbw, 64, IEM_MC_FETCH_MEM_U128_NO_AC);
    823823}
    824824
     
    829829     /** @todo r=aeichner Review code, the naming of this function and the parameter type specifiers. */
    830830    IEMOP_MNEMONIC2(VEX_RM, VPMOVZXBD, vpmovzxbd, Vx, Wq, DISOPTYPE_HARMLESS, 0);
    831     IEMOP_BODY_VPMOV_S_Z(vpmovzxbd, 32);
     831    IEMOP_BODY_VPMOV_S_Z(vpmovzxbd, 32, IEM_MC_FETCH_MEM_U128);
    832832}
    833833
     
    838838     /** @todo r=aeichner Review code, the naming of this function and the parameter type specifiers. */
    839839    IEMOP_MNEMONIC2(VEX_RM, VPMOVZXBQ, vpmovzxbq, Vx, Wq, DISOPTYPE_HARMLESS, 0);
    840     IEMOP_BODY_VPMOV_S_Z(vpmovzxbq, 16);
     840    IEMOP_BODY_VPMOV_S_Z(vpmovzxbq, 16, IEM_MC_FETCH_MEM_U128);
    841841}
    842842
     
    847847     /** @todo r=aeichner Review code, the naming of this function and the parameter type specifiers. */
    848848    IEMOP_MNEMONIC2(VEX_RM, VPMOVZXWD, vpmovzxwd, Vx, Wq, DISOPTYPE_HARMLESS, 0);
    849     IEMOP_BODY_VPMOV_S_Z(vpmovzxwd, 64);
     849    IEMOP_BODY_VPMOV_S_Z(vpmovzxwd, 64, IEM_MC_FETCH_MEM_U128_NO_AC);
    850850}
    851851
     
    856856     /** @todo r=aeichner Review code, the naming of this function and the parameter type specifiers. */
    857857    IEMOP_MNEMONIC2(VEX_RM, VPMOVZXWQ, vpmovzxwq, Vx, Wq, DISOPTYPE_HARMLESS, 0);
    858     IEMOP_BODY_VPMOV_S_Z(vpmovzxwq, 32);
     858    IEMOP_BODY_VPMOV_S_Z(vpmovzxwq, 32, IEM_MC_FETCH_MEM_U128);
    859859}
    860860
     
    865865     /** @todo r=aeichner Review code, the naming of this function and the parameter type specifiers. */
    866866    IEMOP_MNEMONIC2(VEX_RM, VPMOVZXDQ, vpmovzxdq, Vx, Wq, DISOPTYPE_HARMLESS, 0);
    867     IEMOP_BODY_VPMOV_S_Z(vpmovzxdq, 64);
     867    IEMOP_BODY_VPMOV_S_Z(vpmovzxdq, 64, IEM_MC_FETCH_MEM_U128_NO_AC);
    868868}
    869869
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