VirtualBox

Changeset 61031 in vbox for trunk/src/VBox/VMM/VMMR0


Ignore:
Timestamp:
May 18, 2016 11:12:00 AM (9 years ago)
Author:
vboxsync
Message:

Oops, committed too much!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/CPUMR0A.asm

    r61029 r61031  
    201201
    202202
    203 ;; Macro for FXSAVE/XSAVE for the guest FPU but tries to figure out whether to
     203;; Macro for FXSAVE for the guest FPU but tries to figure out whether to
    204204;  save the 32-bit FPU state or 64-bit FPU state.
    205205;
     
    207207; @param    %2      Pointer to XState.
    208208; @param    %3      Force AMD64
    209 ; @param    %4      Use XSAVE
    210209; @uses     xAX, xDX, EFLAGS, 20h of stack.
    211210;
    212 %macro SAVE_32_OR_64_FPU 4
     211%macro SAVE_32_OR_64_FPU 3
    213212%if CPUMR0_IS_AMD64 || %3
    214213        ; Save the guest FPU (32-bit or 64-bit), preserves existing broken state. See @bugref{7138}.
     
    216215        jnz     short %%save_long_mode_guest
    217216%endif
    218 %if %4
    219         xsave   [pXState]
    220 %else
    221217        fxsave  [pXState]
    222 %endif
    223218%if CPUMR0_IS_AMD64 || %3
    224219        jmp     %%save_done_32bit_cs_ds
    225220
    226221%%save_long_mode_guest:
    227 %if %4
    228         o64 xsave  [pXState]
    229 %else
    230222        o64 fxsave [pXState]
    231 %endif
    232223
    233224        xor     edx, edx
     
    275266        and     eax, ~CPUM_VOLATILE_XSAVE_GUEST_COMPONENTS ; Already saved in HMR0A.asm.
    276267%endif
    277         SAVE_32_OR_64_FPU pCpumCpu, pXState, 0, 1
     268%ifdef RT_ARCH_AMD64
     269        o64 xsave [pXState]
     270%else
     271        xsave   [pXState]
     272%endif
    278273        jmp     %%guest_done
    279274
    280275        ; FXSAVE
    281276%%guest_fxsave:
    282         SAVE_32_OR_64_FPU pCpumCpu, pXState, 0, 0
     277        SAVE_32_OR_64_FPU pCpumCpu, pXState, 0
    283278
    284279%%guest_done:
     
    287282
    288283;;
    289 ; Wrapper for selecting 32-bit or 64-bit FXRSTOR/XRSTOR according to what SAVE_32_OR_64_FPU did.
     284; Wrapper for selecting 32-bit or 64-bit FXRSTOR according to what SAVE_32_OR_64_FPU did.
    290285;
    291286; @param    %1      Pointer to CPUMCPU.
    292287; @param    %2      Pointer to XState.
    293288; @param    %3      Force AMD64.
    294 ; @param    %4      Use XRSTOR
    295289; @uses     xAX, xDX, EFLAGS
    296290;
    297 %macro RESTORE_32_OR_64_FPU 4
     291%macro RESTORE_32_OR_64_FPU 3
    298292%if CPUMR0_IS_AMD64 || %3
    299293        ; Restore the guest FPU (32-bit or 64-bit), preserves existing broken state. See @bugref{7138}.
     
    304298%%restore_32bit_fpu:
    305299%endif
    306 %if %4
    307         xrstor  [pXState]
    308 %else
    309300        fxrstor [pXState]
    310 %endif
    311301%if CPUMR0_IS_AMD64 || %3
    312302        ; TODO: Restore XMM8-XMM15!
    313303        jmp     short %%restore_fpu_done
    314304%%restore_64bit_fpu:
    315 %if %4
    316         o64 xrstor  [pXState]
    317 %else
    318305        o64 fxrstor [pXState]
    319 %endif
    320306%%restore_fpu_done:
    321307%endif
     
    348334        and     eax, ~CPUM_VOLATILE_XSAVE_GUEST_COMPONENTS ; Will be loaded by HMR0A.asm.
    349335%endif
    350         RESTORE_32_OR_64_FPU pCpumCpu, pXState, 0, 1
     336%ifdef RT_ARCH_AMD64
     337        o64 xrstor [pXState]
     338%else
     339        xrstor  [pXState]
     340%endif
    351341        jmp     %%guest_done
    352342
    353343        ; FXRSTOR
    354344%%guest_fxrstor:
    355         RESTORE_32_OR_64_FPU pCpumCpu, pXState, 0, 0
     345        RESTORE_32_OR_64_FPU pCpumCpu, pXState, 0
    356346
    357347%%guest_done:
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