• Avi Kivity's avatar
    KVM: x86 emulator: Fix stack instructions on 64-bit mode · 6e3d5dfb
    Avi Kivity authored
    Stack instructions are always 64-bit on 64-bit mode; many of the
    emulated stack instructions did not take that into account.  Fix by
    adding a 'Stack' bitflag and setting the operand size appropriately
    during the decode stage (except for 'push r/m', which is in a group
    with a few other instructions, so it gets its own treatment).
    
    This fixes random crashes on Vista x64.
    Signed-off-by: default avatarAvi Kivity <avi@qumranet.com>
    6e3d5dfb
x86_emulate.c 50.6 KB