8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / lib / libcpc / i386 / getcpuid.s
blobad2374e81ad1e2f94476a9af6051242012f65d4f
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
20 * CDDL HEADER END
23 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #pragma ident "%Z%%M% %I% %E% SMI"
29 #include <sys/asm_linkage.h>
31 #if defined(lint)
33 #include <sys/types.h>
34 #include <sys/inttypes.h>
36 #include "getcpuid.h"
38 /*ARGSUSED*/
39 uint32_t
40 cpc_getcpuid(uint32_t eax, uint32_t *ebxp, uint32_t *ecxp, uint32_t *edxp)
41 { return (0); }
43 #else /* lint */
45 ENTRY(cpc_getcpuid)
46 pushl %ebp
47 movl %esp, %ebp
48 pushl %ebx
49 movl 8(%ebp), %eax
50 cpuid
51 pushl %eax
52 movl 0xc(%ebp), %eax
53 movl %ebx, (%eax)
54 movl 0x10(%ebp), %eax
55 movl %ecx, (%eax)
56 movl 0x14(%ebp), %eax
57 movl %edx, (%eax)
58 popl %eax
59 popl %ebx
60 popl %ebp
61 ret
62 SET_SIZE(cpc_getcpuid)
64 #endif /* lint */