VirtualBox

Changeset 66395 in vbox for trunk


Ignore:
Timestamp:
Apr 3, 2017 8:55:17 AM (8 years ago)
Author:
vboxsync
Message:

asm-amd64-x86.h: Added ASMFxRstor & ASMFxSave.

Location:
trunk
Files:
3 edited
2 copied

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/asm-amd64-x86.h

    r62634 r66395  
    19601960
    19611961
     1962struct X86FXSTATE;
     1963/**
     1964 * Save FPU and SSE CPU state.
     1965 * @param   pFxState        Where to save the state.
     1966 */
     1967DECLASM(void) ASMFxSave(struct X86FXSTATE *pXStateArea);
     1968
     1969/**
     1970 * Load FPU and SSE CPU state.
     1971 * @param   pFxState        Where to load the state from.
     1972 */
     1973DECLASM(void) ASMFxRstor(struct X86FXSTATE const *pXStateArea);
     1974
     1975
    19621976/**
    19631977 * Enables interrupts (EFLAGS.IF).
  • trunk/include/iprt/mangling.h

    r66361 r66395  
    357357# define ASMXSave                                       RT_MANGLER(ASMXSave)
    358358# 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)
    359363
    360364# define RTAssertAreQuiet                               RT_MANGLER(RTAssertAreQuiet)
  • trunk/src/VBox/Runtime/Makefile.kmk

    r66384 r66395  
    708708        common/asm/ASMXSave.asm \
    709709        common/asm/ASMXRstor.asm \
     710        common/asm/ASMFxSave.asm \
     711        common/asm/ASMFxRstor.asm \
    710712        common/asm/ASMSerializeInstruction-cpuid.asm \
    711713        common/asm/ASMSerializeInstruction-iret.asm \
     
    727729        common/asm/ASMXSave.asm \
    728730        common/asm/ASMXRstor.asm \
     731        common/asm/ASMFxSave.asm \
     732        common/asm/ASMFxRstor.asm \
    729733        common/asm/ASMSerializeInstruction-cpuid.asm \
    730734        common/asm/ASMSerializeInstruction-iret.asm \
     
    19451949        common/asm/ASMXSave.asm \
    19461950        common/asm/ASMXRstor.asm \
     1951        common/asm/ASMFxSave.asm \
     1952        common/asm/ASMFxRstor.asm \
    19471953        common/asm/ASMRdMsrEx.asm \
    19481954        common/asm/ASMWrMsrEx.asm
     
    19601966        common/asm/ASMXSave.asm \
    19611967        common/asm/ASMXRstor.asm \
     1968        common/asm/ASMFxSave.asm \
     1969        common/asm/ASMFxRstor.asm \
    19621970        common/asm/ASMRdMsrEx.asm \
    19631971        common/asm/ASMWrMsrEx.asm
     
    25682576        common/asm/ASMXSave.asm \
    25692577        common/asm/ASMXRstor.asm \
     2578        common/asm/ASMFxSave.asm \
     2579        common/asm/ASMFxRstor.asm \
    25702580        common/checksum/alt-md5.cpp \
    25712581        common/checksum/crc32.cpp \
  • trunk/src/VBox/Runtime/common/asm/ASMFxRstor.asm

    r66384 r66395  
    11; $Id$
    22;; @file
    3 ; IPRT - ASMXRstor().
     3; IPRT - ASMFxRstor().
    44;
    55
    66;
    7 ; Copyright (C) 2006-2016 Oracle Corporation
     7; Copyright (C) 2006-2017 Oracle Corporation
    88;
    99; This file is part of VirtualBox Open Source Edition (OSE), as
     
    3535;;
    3636; Loads extended CPU state.
    37 ; @param    pXStateArea Pointer to the XRSTOR state area.
     37; @param    pFxState    Pointer to the FXRSTOR state area.
    3838;                       msc=rcx, gcc=rdi, x86=[esp+4]
    39 ; @param    fMask       The 64-bit state component mask.
    40 ;                       msc=rdx, gcc=rsi, x86=[esp+8]
    4139;
    42 BEGINPROC_EXPORTED ASMXRstor
     40BEGINPROC_EXPORTED ASMFxRstor
    4341SEH64_END_PROLOGUE
    4442%ifdef ASM_CALL64_MSC
    45         mov     eax, edx
    46         shr     rdx, 32
    47         xrstor  [rcx]
     43        o64 fxrstor [rcx]
    4844%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
    5447        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
    5859%else
    5960 %error "Undefined arch?"
    6061%endif
    6162        ret
    62 ENDPROC ASMXRstor
     63ENDPROC ASMFxRstor
    6364
  • trunk/src/VBox/Runtime/common/asm/ASMFxSave.asm

    r66384 r66395  
    11; $Id$
    22;; @file
    3 ; IPRT - ASMXSave().
     3; IPRT - ASMFxSave().
    44;
    55
    66;
    7 ; Copyright (C) 2006-2016 Oracle Corporation
     7; Copyright (C) 2006-2017 Oracle Corporation
    88;
    99; This file is part of VirtualBox Open Source Edition (OSE), as
     
    3535;;
    3636; Saves extended CPU state.
    37 ; @param    pXStateArea Pointer to the XSAVE state area.
     37; @param    pFxState    Pointer to the XSAVE state area.
    3838;                       msc=rcx, gcc=rdi, x86=[esp+4]
    39 ; @param    fComponents The 64-bit state component mask.
    40 ;                       msc=rdx, gcc=rsi, x86=[esp+8]
    4139;
    42 BEGINPROC_EXPORTED ASMXSave
     40BEGINPROC_EXPORTED ASMFxSave
    4341SEH64_END_PROLOGUE
    4442%ifdef ASM_CALL64_MSC
    45         mov     eax, edx
    46         shr     rdx, 32
    47         xsave   [rcx]
     43        o64 fxsave [rcx]
    4844%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
    5447        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
    5859%else
    5960 %error "Undefined arch?"
    6061%endif
    6162        ret
    62 ENDPROC ASMXSave
     63ENDPROC ASMFxSave
    6364
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