VirtualBox

Changeset 66199 in vbox


Ignore:
Timestamp:
Mar 22, 2017 2:24:38 PM (8 years ago)
Author:
vboxsync
Message:

bs3-cmn-RegCtxSaveEx.asm: Do xSP subtraction on the whole register in 32-bit and 64-bit mode, not just SP.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-RegCtxSaveEx.asm

    r60749 r66199  
    111111        ; are saving a 64-bit context.
    112112        ;
    113         mov     ax, [xBP + xCB + cbCurRetAddr + sCB + xCB]
     113TONLY16 mov     ax, [xBP + xCB + cbCurRetAddr + sCB + xCB]
     114TNOT16  movzx   eax, word [xBP + xCB + cbCurRetAddr + sCB + xCB]
    114115%ifdef BS3_STRICT
    115         cmp     ax, 4096
     116        cmp     xAX, 4096
    116117        jb      .extra_stack_ok
    117118        call    Bs3Panic
    118119.extra_stack_ok:
    119120%endif
    120         cmp     ax, 20h
     121        cmp     xAX, 20h
    121122        jae     .at_least_20h_extra_stack
    122         add     ax, 20h
     123        add     xAX, 20h
    123124.at_least_20h_extra_stack:
    124         sub     sp, ax
     125        sub     xSP, xAX
    125126
    126127        ;
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