VirtualBox

Ignore:
Timestamp:
May 19, 2016 7:12:56 PM (9 years ago)
Author:
vboxsync
Message:

CPUM,++: Split up CPUM_USED_FPU into CPUM_USED_FPU_GUEST & CPUM_USED_FPU_HOST.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMSwitcher/AMD64andLegacy.mac

    r58122 r61058  
    454454    ;; handle use flags.
    455455    mov     esi, [rdx + r8 + CPUMCPU.fUseFlags] ; esi == use flags.
    456     and     esi, ~CPUM_USED_FPU   ; Clear CPUM_USED_* flags. ;;@todo FPU check can be optimized to use cr0 flags!
     456    and     esi, ~(CPUM_USED_FPU_GUEST | CPUM_USED_FPU_HOST) ; Clear CPUM_USED_* flags.
    457457    mov     [rdx + r8 + CPUMCPU.fUseFlags], esi
    458458
     
    10641064    ; Using fxrstor should ensure that we're not causing unwanted exception on the host.
    10651065    mov     esi, [rdx + r8 + CPUMCPU.fUseFlags] ; esi == use flags.
    1066     test    esi, CPUM_USED_FPU
     1066    test    esi, (CPUM_USED_FPU_GUEST | CPUM_USED_FPU_HOST)
    10671067    jz      gth_fpu_no
    10681068    mov     rcx, cr0
     
    10721072    mov     r10, rdx                    ; Save rdx.
    10731073
     1074    test    esi, CPUM_USED_FPU_GUEST
     1075    jz      gth_fpu_host
     1076
    10741077    mov     eax, [r10 + r8 + CPUMCPU.Guest.fXStateMask]
    1075     mov     r9, [r10 + r8 + CPUMCPU.Guest.pXStateR0]
     1078    mov     r9,  [r10 + r8 + CPUMCPU.Guest.pXStateR0]
    10761079    or      eax, eax
    10771080    jz      gth_fpu_guest_fxsave
     
    10841087gth_fpu_host:
    10851088    mov     eax, [r10 + r8 + CPUMCPU.Host.fXStateMask]
    1086     mov     r9, [r10 + r8 + CPUMCPU.Host.pXStateR0]
     1089    mov     r9,  [r10 + r8 + CPUMCPU.Host.pXStateR0]
    10871090    or      eax, eax
    10881091    jz      gth_fpu_host_fxrstor
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