VirtualBox

Changeset 47323 in vbox for trunk/src


Ignore:
Timestamp:
Jul 22, 2013 7:04:20 PM (12 years ago)
Author:
vboxsync
Message:

IEM: BSWAP fix (don't blindly trust the intel manual).

Location:
trunk/src/VBox/VMM
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/Makefile.kmk

    r47307 r47323  
    706706# Always optimize the interpreter.
    707707#
     708ifn1of ($(USERNAME),bird)
    708709if1of ($(KBUILD_TARGET), win)
    709710 # -noover is recognized despite the statement saying otherwise. It silences these warnings:
     
    717718 VMMAll/IEMAll.cpp_CXXFLAGS += -fomit-frame-pointer # Omitting the frame pointer results in larger code, but it might be worth it. (esp addressing vs ebp?)
    718719endif
     720endif # bird wants good stacks
    719721
    720722include $(FILE_KBUILD_SUB_FOOTER)
  • trunk/src/VBox/VMM/VMMAll/IEMAllInstructions.cpp.h

    r47307 r47323  
    52795279{
    52805280    IEMOP_MNEMONIC("bswap rAX/r8");
    5281     return FNIEMOP_CALL_1(iemOpCommonBswapGReg, X86_GREG_xAX | pIemCpu->uRexReg);
     5281    /* Note! Intel manuals states that R8-R15 can be accessed by using a REX.X
     5282             prefix.  REX.B is the correct prefix it appears.  For a parallel
     5283             case, see iemOp_mov_AL_Ib and iemOp_mov_eAX_Iv. */
     5284    return FNIEMOP_CALL_1(iemOpCommonBswapGReg, X86_GREG_xAX | pIemCpu->uRexB);
    52825285}
    52835286
     
    52875290{
    52885291    IEMOP_MNEMONIC("bswap rCX/r9");
    5289     return FNIEMOP_CALL_1(iemOpCommonBswapGReg, X86_GREG_xCX | pIemCpu->uRexReg);
     5292    return FNIEMOP_CALL_1(iemOpCommonBswapGReg, X86_GREG_xCX | pIemCpu->uRexB);
    52905293}
    52915294
     
    52955298{
    52965299    IEMOP_MNEMONIC("bswap rDX/r9");
    5297     return FNIEMOP_CALL_1(iemOpCommonBswapGReg, X86_GREG_xDX | pIemCpu->uRexReg);
     5300    return FNIEMOP_CALL_1(iemOpCommonBswapGReg, X86_GREG_xDX | pIemCpu->uRexB);
    52985301}
    52995302
     
    53035306{
    53045307    IEMOP_MNEMONIC("bswap rBX/r9");
    5305     return FNIEMOP_CALL_1(iemOpCommonBswapGReg, X86_GREG_xBX | pIemCpu->uRexReg);
     5308    return FNIEMOP_CALL_1(iemOpCommonBswapGReg, X86_GREG_xBX | pIemCpu->uRexB);
    53065309}
    53075310
     
    53115314{
    53125315    IEMOP_MNEMONIC("bswap rSP/r12");
    5313     return FNIEMOP_CALL_1(iemOpCommonBswapGReg, X86_GREG_xSP | pIemCpu->uRexReg);
     5316    return FNIEMOP_CALL_1(iemOpCommonBswapGReg, X86_GREG_xSP | pIemCpu->uRexB);
    53145317}
    53155318
     
    53195322{
    53205323    IEMOP_MNEMONIC("bswap rBP/r13");
    5321     return FNIEMOP_CALL_1(iemOpCommonBswapGReg, X86_GREG_xBP | pIemCpu->uRexReg);
     5324    return FNIEMOP_CALL_1(iemOpCommonBswapGReg, X86_GREG_xBP | pIemCpu->uRexB);
    53225325}
    53235326
     
    53275330{
    53285331    IEMOP_MNEMONIC("bswap rSI/r14");
    5329     return FNIEMOP_CALL_1(iemOpCommonBswapGReg, X86_GREG_xSI | pIemCpu->uRexReg);
     5332    return FNIEMOP_CALL_1(iemOpCommonBswapGReg, X86_GREG_xSI | pIemCpu->uRexB);
    53305333}
    53315334
     
    53355338{
    53365339    IEMOP_MNEMONIC("bswap rDI/r15");
    5337     return FNIEMOP_CALL_1(iemOpCommonBswapGReg, X86_GREG_xDI | pIemCpu->uRexReg);
     5340    return FNIEMOP_CALL_1(iemOpCommonBswapGReg, X86_GREG_xDI | pIemCpu->uRexB);
    53385341}
    53395342
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