VirtualBox

Ignore:
Timestamp:
Feb 17, 2015 10:58:55 PM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
98321
Message:

Added ASMGetIdtrLimit.

File:
1 copied

Legend:

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

    r54253 r54254  
    11; $Id$
    22;; @file
    3 ; IPRT - ASMGetIDTR().
     3; IPRT - ASMGetIdtrLimit().
    44;
    55
    66;
    7 ; Copyright (C) 2006-2013 Oracle Corporation
     7; Copyright (C) 2006-2015 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
     
    3435;;
    3536; Gets the content of the IDTR CPU register.
    36 ; @param    pIdtr   Where to store the IDTR contents.
    37 ;                   msc=rcx, gcc=rdi, x86=[esp+4]
     37; @returns  IDTR.LIMIT in ax
    3838;
    39 BEGINPROC_EXPORTED ASMGetIDTR
    40 %ifdef ASM_CALL64_MSC
    41         mov     rax, rcx
    42 %elifdef ASM_CALL64_GCC
    43         mov     rax, rdi
    44 %elifdef RT_ARCH_X86
    45         mov     eax, [esp + 4]
    46 %else
    47  %error "Undefined arch?"
    48 %endif
    49         sidt    [xAX]
     39BEGINPROC_EXPORTED ASMGetIdtrLimit
     40        sub     xSP, 18h
     41        SEH64_ALLOCATE_STACK 18h
     42SEH64_END_PROLOGUE
     43        sidt    [xSP + 6]
     44        mov     ax, [xSP + 6]
     45        add     xSP, 18h
    5046        ret
    51 ENDPROC ASMGetIDTR
     47ENDPROC ASMGetIdtrLimit
    5248
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette