git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2590 6f19259b...
[mirror_edk2.git] / MdePkg / Library / BaseLib / Ipf / ReadCpuid.s
1 /// @file
2 /// IPF specific AsmReadCpuid()function
3 ///
4 /// Copyright (c) 2006, Intel Corporation
5 /// All rights reserved. This program and the accompanying materials
6 /// are licensed and made available under the terms and conditions of the BSD License
7 /// which accompanies this distribution. The full text of the license may be found at
8 /// http://opensource.org/licenses/bsd-license.php
9 ///
10 /// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 /// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 ///
13 /// Module Name: ReadCpuid.s
14 ///
15 ///
16
17 //---------------------------------------------------------------------------------
18 //++
19 // AsmReadCpuid
20 //
21 // This routine is used to Reads the current value of Processor Identifier Register (CPUID).
22 //
23 // Arguments :
24 //
25 // On Entry : The 8-bit Processor Identifier Register index to read.
26 //
27 // Return Value: The current value of Processor Identifier Register specified by Index.
28 //
29 //--
30 //----------------------------------------------------------------------------------
31 .text
32 .type AsmReadCpuid, @function
33 .proc AsmReadCpuid
34 .regstk 1, 0, 0, 0
35
36 AsmReadCpuid::
37 mov r8 = cpuid[in0];;
38 br.ret.dpnt b0;;
39 .endp AsmReadCpuid
40