CpuId.asm revision 4fd606d1f5abe38e1f42c38de1d2e895166bd0f4
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync;------------------------------------------------------------------------------
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync; This program and the accompanying materials
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync; are licensed and made available under the terms and conditions of the BSD License
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync; which accompanies this distribution. The full text of the license may be found at
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync; Module Name:
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync; AsmCpuid function
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync;------------------------------------------------------------------------------
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync;------------------------------------------------------------------------------
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync; AsmCpuid (
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync; IN UINT32 RegisterInEax,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync; OUT UINT32 *RegisterOutEax OPTIONAL,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync; OUT UINT32 *RegisterOutEbx OPTIONAL,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync; OUT UINT32 *RegisterOutEcx OPTIONAL,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync; OUT UINT32 *RegisterOutEdx OPTIONAL
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync;------------------------------------------------------------------------------
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncAsmCpuid PROC USES rbx
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync mov eax, ecx
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync push rax ; save Index on stack
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync test r9, r9
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync mov [r9], ecx
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync mov [rcx], eax
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync mov rcx, r8
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync mov [rcx], ebx
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync mov rcx, [rsp + 38h]
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync mov [rcx], edx
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync pop rax ; restore Index to rax as return value
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncAsmCpuid ENDP