Changeset 55107 in vbox for trunk/src/VBox/Runtime/common/asm
- Timestamp:
- Apr 6, 2015 11:34:45 PM (10 years ago)
- svn:sync-xref-src-repo-rev:
- 99402
- Location:
- trunk/src/VBox/Runtime/common/asm
- Files:
-
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/asm/ASMGetXcr0.asm
r55084 r55107 1 1 ; $Id$ 2 2 ;; @file 3 ; IPRT - ASMGet GDTR().3 ; IPRT - ASMGetXcr0(). 4 4 ; 5 5 6 6 ; 7 ; Copyright (C) 2006-201 3Oracle Corporation7 ; Copyright (C) 2006-2015 Oracle Corporation 8 8 ; 9 9 ; This file is part of VirtualBox Open Source Edition (OSE), as … … 33 33 34 34 ;; 35 ; Gets the content of the GDTR CPU register. 36 ; @param pGdtr Where to store the GDTR contents. 37 ; msc=rcx, gcc=rdi, x86=[esp+4] 35 ; Gets the content of the XCR0 CPU register. 36 ; @returns XCR0 value in rax (amd64) / edx:eax (x86). 38 37 ; 39 BEGINPROC_EXPORTED ASMGetGDTR 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?" 38 BEGINPROC_EXPORTED ASMGetXcr0 39 xor ecx, ecx ; XCR0 40 xgetbv 41 %ifdef RT_ARCH_AMD64 42 shl rdx, 32 43 or rax, rdx 48 44 %endif 49 sgdt [xAX]50 45 ret 51 ENDPROC ASMGet GDTR46 ENDPROC ASMGetXcr0 52 47 -
trunk/src/VBox/Runtime/common/asm/ASMSetXcr0.asm
r55084 r55107 1 1 ; $Id$ 2 2 ;; @file 3 ; IPRT - ASMSet GDTR().3 ; IPRT - ASMSetXcr0(). 4 4 ; 5 5 6 6 ; 7 ; Copyright (C) 2006-201 4Oracle Corporation7 ; Copyright (C) 2006-2015 Oracle Corporation 8 8 ; 9 9 ; This file is part of VirtualBox Open Source Edition (OSE), as … … 33 33 34 34 ;; 35 ; Sets the content of the GDTRCPU register.36 ; @param pGdtr Where to load the GDTR contents from.35 ; Sets the content of the Xcr0 CPU register. 36 ; @param uXcr0 The new XCR0 content. 37 37 ; msc=rcx, gcc=rdi, x86=[esp+4] 38 38 ; 39 BEGINPROC_EXPORTED ASMSet GDTR39 BEGINPROC_EXPORTED ASMSetXcr0 40 40 %ifdef ASM_CALL64_MSC 41 mov rax, rcx 41 mov rdx, rcx 42 shr rdx, 32 43 mov eax, ecx 42 44 %elifdef ASM_CALL64_GCC 43 mov rax, rdi 45 mov rdx, rdi 46 shr rdx, 32 47 mov eax, edi 44 48 %elifdef RT_ARCH_X86 45 49 mov eax, [esp + 4] 50 mov edx, [esp + 8] 46 51 %else 47 52 %error "Undefined arch?" 48 53 %endif 49 lgdt [xAX] 54 xor ecx, ecx 55 xsetbv 50 56 ret 51 ENDPROC ASMSet GDTR57 ENDPROC ASMSetXcr0 52 58
Note:
See TracChangeset
for help on using the changeset viewer.