Changeset 61162 in vbox for trunk/src/VBox
- Timestamp:
- May 24, 2016 12:49:54 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/include/CPUMInternal.mac
r61144 r61162 713 713 714 714 715 ;; Macro for FXSAVE for the guest FPU but tries to figure out whether to715 ;; Macro for XSAVE/FXSAVE for the guest FPU but tries to figure out whether to 716 716 ; save the 32-bit FPU state or 64-bit FPU state. 717 717 ; … … 719 719 ; @param %2 Pointer to XState. 720 720 ; @param %3 Force AMD64 721 ; @param %4 The instruction to use (xsave or fxsave) 721 722 ; @uses xAX, xDX, EFLAGS, 20h of stack. 722 723 ; 723 %macro SAVE_32_OR_64_FPU 3724 %macro SAVE_32_OR_64_FPU 4 724 725 %if CPUM_IS_AMD64 || %3 725 726 ; Save the guest FPU (32-bit or 64-bit), preserves existing broken state. See @bugref{7138}. … … 727 728 jnz short %%save_long_mode_guest 728 729 %endif 729 fxsave[pXState]730 %4 [pXState] 730 731 %if CPUM_IS_AMD64 || %3 731 732 jmp %%save_done_32bit_cs_ds 732 733 733 734 %%save_long_mode_guest: 734 o64 fxsave[pXState]735 o64 %4 [pXState] 735 736 736 737 xor edx, edx … … 784 785 and eax, ~CPUM_VOLATILE_XSAVE_GUEST_COMPONENTS ; Already saved in HMR0A.asm. 785 786 %endif 786 %ifdef RT_ARCH_AMD64 787 o64 xsave [pXState] 788 %else 789 xsave [pXState] 790 %endif 787 SAVE_32_OR_64_FPU pCpumCpu, pXState, 0, xsave 791 788 jmp %%guest_done 792 789 793 790 ; FXSAVE 794 791 %%guest_fxsave: 795 SAVE_32_OR_64_FPU pCpumCpu, pXState, 0 792 SAVE_32_OR_64_FPU pCpumCpu, pXState, 0, fxsave 796 793 797 794 %%guest_done: … … 800 797 801 798 ;; 802 ; Wrapper for selecting 32-bit or 64-bit FXRSTOR according to what SAVE_32_OR_64_FPU did.799 ; Wrapper for selecting 32-bit or 64-bit XRSTOR/FXRSTOR according to what SAVE_32_OR_64_FPU did. 803 800 ; 804 801 ; @param %1 Pointer to CPUMCPU. 805 802 ; @param %2 Pointer to XState. 806 803 ; @param %3 Force AMD64. 804 ; @param %4 The instruction to use (xrstor or fxrstor). 807 805 ; @uses xAX, xDX, EFLAGS 808 806 ; 809 %macro RESTORE_32_OR_64_FPU 3807 %macro RESTORE_32_OR_64_FPU 4 810 808 %if CPUM_IS_AMD64 || %3 811 809 ; Restore the guest FPU (32-bit or 64-bit), preserves existing broken state. See @bugref{7138}. … … 816 814 %%restore_32bit_fpu: 817 815 %endif 818 fxrstor[pXState]816 %4 [pXState] 819 817 %if CPUM_IS_AMD64 || %3 820 818 ; TODO: Restore XMM8-XMM15! 821 819 jmp short %%restore_fpu_done 822 820 %%restore_64bit_fpu: 823 o64 fxrstor[pXState]821 o64 %4 [pXState] 824 822 %%restore_fpu_done: 825 823 %endif … … 858 856 and eax, ~CPUM_VOLATILE_XSAVE_GUEST_COMPONENTS ; Will be loaded by HMR0A.asm. 859 857 %endif 860 %ifdef RT_ARCH_AMD64 861 o64 xrstor [pXState] 862 %else 863 xrstor [pXState] 864 %endif 858 RESTORE_32_OR_64_FPU pCpumCpu, pXState, 0, xrstor 865 859 jmp %%guest_done 866 860 867 861 ; FXRSTOR 868 862 %%guest_fxrstor: 869 RESTORE_32_OR_64_FPU pCpumCpu, pXState, 0 863 RESTORE_32_OR_64_FPU pCpumCpu, pXState, 0, fxrstor 870 864 871 865 %%guest_done:
Note:
See TracChangeset
for help on using the changeset viewer.