- Timestamp:
- Apr 3, 2017 8:55:17 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
- 2 copied
-
include/iprt/asm-amd64-x86.h (modified) (1 diff)
-
include/iprt/mangling.h (modified) (1 diff)
-
src/VBox/Runtime/Makefile.kmk (modified) (5 diffs)
-
src/VBox/Runtime/common/asm/ASMFxRstor.asm (copied) (copied from trunk/src/VBox/Runtime/common/asm/ASMXRstor.asm ) (2 diffs)
-
src/VBox/Runtime/common/asm/ASMFxSave.asm (copied) (copied from trunk/src/VBox/Runtime/common/asm/ASMXSave.asm ) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/asm-amd64-x86.h
r62634 r66395 1960 1960 1961 1961 1962 struct X86FXSTATE; 1963 /** 1964 * Save FPU and SSE CPU state. 1965 * @param pFxState Where to save the state. 1966 */ 1967 DECLASM(void) ASMFxSave(struct X86FXSTATE *pXStateArea); 1968 1969 /** 1970 * Load FPU and SSE CPU state. 1971 * @param pFxState Where to load the state from. 1972 */ 1973 DECLASM(void) ASMFxRstor(struct X86FXSTATE const *pXStateArea); 1974 1975 1962 1976 /** 1963 1977 * Enables interrupts (EFLAGS.IF). -
trunk/include/iprt/mangling.h
r66361 r66395 357 357 # define ASMXSave RT_MANGLER(ASMXSave) 358 358 # define ASMXSave_EndProc RT_MANGLER(ASMXSave_EndProc) 359 # define ASMFxRstor RT_MANGLER(ASMFxRstor) 360 # define ASMFxRstor_EndProc RT_MANGLER(ASMFxRstor_EndProc) 361 # define ASMFxSave RT_MANGLER(ASMFxSave) 362 # define ASMFxSave_EndProc RT_MANGLER(ASMFxSave_EndProc) 359 363 360 364 # define RTAssertAreQuiet RT_MANGLER(RTAssertAreQuiet) -
trunk/src/VBox/Runtime/Makefile.kmk
r66384 r66395 708 708 common/asm/ASMXSave.asm \ 709 709 common/asm/ASMXRstor.asm \ 710 common/asm/ASMFxSave.asm \ 711 common/asm/ASMFxRstor.asm \ 710 712 common/asm/ASMSerializeInstruction-cpuid.asm \ 711 713 common/asm/ASMSerializeInstruction-iret.asm \ … … 727 729 common/asm/ASMXSave.asm \ 728 730 common/asm/ASMXRstor.asm \ 731 common/asm/ASMFxSave.asm \ 732 common/asm/ASMFxRstor.asm \ 729 733 common/asm/ASMSerializeInstruction-cpuid.asm \ 730 734 common/asm/ASMSerializeInstruction-iret.asm \ … … 1945 1949 common/asm/ASMXSave.asm \ 1946 1950 common/asm/ASMXRstor.asm \ 1951 common/asm/ASMFxSave.asm \ 1952 common/asm/ASMFxRstor.asm \ 1947 1953 common/asm/ASMRdMsrEx.asm \ 1948 1954 common/asm/ASMWrMsrEx.asm … … 1960 1966 common/asm/ASMXSave.asm \ 1961 1967 common/asm/ASMXRstor.asm \ 1968 common/asm/ASMFxSave.asm \ 1969 common/asm/ASMFxRstor.asm \ 1962 1970 common/asm/ASMRdMsrEx.asm \ 1963 1971 common/asm/ASMWrMsrEx.asm … … 2568 2576 common/asm/ASMXSave.asm \ 2569 2577 common/asm/ASMXRstor.asm \ 2578 common/asm/ASMFxSave.asm \ 2579 common/asm/ASMFxRstor.asm \ 2570 2580 common/checksum/alt-md5.cpp \ 2571 2581 common/checksum/crc32.cpp \ -
trunk/src/VBox/Runtime/common/asm/ASMFxRstor.asm
r66384 r66395 1 1 ; $Id$ 2 2 ;; @file 3 ; IPRT - ASM XRstor().3 ; IPRT - ASMFxRstor(). 4 4 ; 5 5 6 6 ; 7 ; Copyright (C) 2006-201 6Oracle Corporation7 ; Copyright (C) 2006-2017 Oracle Corporation 8 8 ; 9 9 ; This file is part of VirtualBox Open Source Edition (OSE), as … … 35 35 ;; 36 36 ; Loads extended CPU state. 37 ; @param p XStateArea Pointer to theXRSTOR state area.37 ; @param pFxState Pointer to the FXRSTOR state area. 38 38 ; msc=rcx, gcc=rdi, x86=[esp+4] 39 ; @param fMask The 64-bit state component mask.40 ; msc=rdx, gcc=rsi, x86=[esp+8]41 39 ; 42 BEGINPROC_EXPORTED ASM XRstor40 BEGINPROC_EXPORTED ASMFxRstor 43 41 SEH64_END_PROLOGUE 44 42 %ifdef ASM_CALL64_MSC 45 mov eax, edx 46 shr rdx, 32 47 xrstor [rcx] 43 o64 fxrstor [rcx] 48 44 %elifdef ASM_CALL64_GCC 49 mov rdx, rsi 50 shr rdx, 32 51 mov eax, esi 52 xrstor [rdi] 53 %elifdef RT_ARCH_X86 45 o64 fxrstor [rdi] 46 %elif ARCH_BITS == 32 54 47 mov ecx, [esp + 4] 55 mov eax, [esp + 8] 56 mov edx, [esp + 12] 57 xrstor [ecx] 48 fxrstor [ecx] 49 %elif ARCH_BITS == 16 50 push bp 51 mov bp, sp 52 push es 53 push bx 54 les bx, [bp + 4] 55 fxrstor [es:bx] 56 pop bx 57 pop es 58 pop bp 58 59 %else 59 60 %error "Undefined arch?" 60 61 %endif 61 62 ret 62 ENDPROC ASM XRstor63 ENDPROC ASMFxRstor 63 64 -
trunk/src/VBox/Runtime/common/asm/ASMFxSave.asm
r66384 r66395 1 1 ; $Id$ 2 2 ;; @file 3 ; IPRT - ASM XSave().3 ; IPRT - ASMFxSave(). 4 4 ; 5 5 6 6 ; 7 ; Copyright (C) 2006-201 6Oracle Corporation7 ; Copyright (C) 2006-2017 Oracle Corporation 8 8 ; 9 9 ; This file is part of VirtualBox Open Source Edition (OSE), as … … 35 35 ;; 36 36 ; Saves extended CPU state. 37 ; @param p XStateAreaPointer to the XSAVE state area.37 ; @param pFxState Pointer to the XSAVE state area. 38 38 ; msc=rcx, gcc=rdi, x86=[esp+4] 39 ; @param fComponents The 64-bit state component mask.40 ; msc=rdx, gcc=rsi, x86=[esp+8]41 39 ; 42 BEGINPROC_EXPORTED ASM XSave40 BEGINPROC_EXPORTED ASMFxSave 43 41 SEH64_END_PROLOGUE 44 42 %ifdef ASM_CALL64_MSC 45 mov eax, edx 46 shr rdx, 32 47 xsave [rcx] 43 o64 fxsave [rcx] 48 44 %elifdef ASM_CALL64_GCC 49 mov rdx, rsi 50 shr rdx, 32 51 mov eax, esi 52 xsave [rdi] 53 %elifdef RT_ARCH_X86 45 o64 fxsave [rdi] 46 %elif ARCH_BITS == 32 54 47 mov ecx, [esp + 4] 55 mov eax, [esp + 8] 56 mov edx, [esp + 12] 57 xsave [ecx] 48 fxsave [ecx] 49 %elif ARCH_BITS == 16 50 push bp 51 mov bp, sp 52 push es 53 push bx 54 les bx, [bp + 4] 55 fxsave [es:bx] 56 pop bx 57 pop es 58 pop bp 58 59 %else 59 60 %error "Undefined arch?" 60 61 %endif 61 62 ret 62 ENDPROC ASM XSave63 ENDPROC ASMFxSave 63 64
Note:
See TracChangeset
for help on using the changeset viewer.

