VirtualBox

Changeset 87403 in vbox for trunk/src/VBox/Runtime/common


Ignore:
Timestamp:
Jan 23, 2021 4:11:18 PM (4 years ago)
Author:
vboxsync
Message:

iprt/asm-amd64-x86.h: Added ASMGetFSBase, ASMSetFSBase, ASMGetGSBase and ASMSetGSBase.

Location:
trunk/src/VBox/Runtime/common/asm
Files:
4 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/asm/ASMGetFSBase.asm

    r87387 r87403  
    11; $Id$
    22;; @file
    3 ; IPRT - ASMGetTR().
     3; IPRT - ASMGetFSBase().
    44;
    55
    66;
    7 ; Copyright (C) 2006-2020 Oracle Corporation
     7; Copyright (C) 2006-2021 Oracle Corporation
    88;
    99; This file is part of VirtualBox Open Source Edition (OSE), as
     
    2828;* Header Files                                                                *
    2929;*******************************************************************************
     30%define RT_ASM_WITH_SEH64
    3031%include "iprt/asmdefs.mac"
    3132
     
    3334
    3435;;
    35 ; Get the TR register.
    36 ; @returns TR.
     36; Get the FS base register.
     37; @returns FS base
    3738;
    38 BEGINPROC_EXPORTED ASMGetTR
    39         str     ax
    40         movzx   eax, ax
     39BEGINPROC_EXPORTED ASMGetFSBase
     40        SEH64_END_PROLOGUE
     41        rdfsbase rax
    4142        ret
    42 ENDPROC ASMGetTR
     43ENDPROC ASMGetFSBase
    4344
  • trunk/src/VBox/Runtime/common/asm/ASMGetGSBase.asm

    r87387 r87403  
    11; $Id$
    22;; @file
    3 ; IPRT - ASMGetTR().
     3; IPRT - ASMGetGSBase().
    44;
    55
    66;
    7 ; Copyright (C) 2006-2020 Oracle Corporation
     7; Copyright (C) 2006-2021 Oracle Corporation
    88;
    99; This file is part of VirtualBox Open Source Edition (OSE), as
     
    2828;* Header Files                                                                *
    2929;*******************************************************************************
     30%define RT_ASM_WITH_SEH64
    3031%include "iprt/asmdefs.mac"
    3132
     
    3334
    3435;;
    35 ; Get the TR register.
    36 ; @returns TR.
     36; Get the GS base register.
     37; @returns GS base
    3738;
    38 BEGINPROC_EXPORTED ASMGetTR
    39         str     ax
    40         movzx   eax, ax
     39BEGINPROC_EXPORTED ASMGetGSBase
     40        SEH64_END_PROLOGUE
     41        rdgsbase rax
    4142        ret
    42 ENDPROC ASMGetTR
     43ENDPROC ASMGetGSBase
    4344
  • trunk/src/VBox/Runtime/common/asm/ASMSetFSBase.asm

    r87387 r87403  
    11; $Id$
    22;; @file
    3 ; IPRT - ASMGetTR().
     3; IPRT - ASMSetFSBase().
    44;
    55
    66;
    7 ; Copyright (C) 2006-2020 Oracle Corporation
     7; Copyright (C) 2006-2021 Oracle Corporation
    88;
    99; This file is part of VirtualBox Open Source Edition (OSE), as
     
    2828;* Header Files                                                                *
    2929;*******************************************************************************
     30%define RT_ASM_WITH_SEH64
    3031%include "iprt/asmdefs.mac"
    3132
     
    3334
    3435;;
    35 ; Get the TR register.
    36 ; @returns TR.
     36; Set the FS base register.
     37; @param    uNewBase    msc:rcx gcc:rdi     New FS base value.
    3738;
    38 BEGINPROC_EXPORTED ASMGetTR
    39         str     ax
    40         movzx   eax, ax
     39BEGINPROC_EXPORTED ASMSetFSBase
     40        SEH64_END_PROLOGUE
     41%ifdef ASM_CALL64_MSC
     42        wrfsbase rcx
     43%else
     44        wrfsbase rdi
     45%endif
    4146        ret
    42 ENDPROC ASMGetTR
     47ENDPROC ASMSetFSBase
    4348
  • trunk/src/VBox/Runtime/common/asm/ASMSetGSBase.asm

    r87387 r87403  
    11; $Id$
    22;; @file
    3 ; IPRT - ASMGetTR().
     3; IPRT - ASMSetGSBase().
    44;
    55
    66;
    7 ; Copyright (C) 2006-2020 Oracle Corporation
     7; Copyright (C) 2006-2021 Oracle Corporation
    88;
    99; This file is part of VirtualBox Open Source Edition (OSE), as
     
    2828;* Header Files                                                                *
    2929;*******************************************************************************
     30%define RT_ASM_WITH_SEH64
    3031%include "iprt/asmdefs.mac"
    3132
     
    3334
    3435;;
    35 ; Get the TR register.
    36 ; @returns TR.
     36; Set the GS base register.
     37; @param    uNewBase    msc:rcx gcc:rdi     New GS base value.
    3738;
    38 BEGINPROC_EXPORTED ASMGetTR
    39         str     ax
    40         movzx   eax, ax
     39BEGINPROC_EXPORTED ASMSetGSBase
     40        SEH64_END_PROLOGUE
     41%ifdef ASM_CALL64_MSC
     42        wrgsbase rcx
     43%else
     44        wrgsbase rdi
     45%endif
    4146        ret
    42 ENDPROC ASMGetTR
     47ENDPROC ASMSetGSBase
    4348
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