8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / lib / libumem / i386 / asm_subr.s
blob5ad5345c6d4b4ecd77c5b06bda78da0d2eb91bfa
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 #include <sys/asm_linkage.h>
29 #define NOP4 \
30 nop; \
31 nop; \
32 nop; \
33 nop;
35 #define NOP16 \
36 NOP4 \
37 NOP4 \
38 NOP4 \
39 NOP4
41 #define NOP64 \
42 NOP16 \
43 NOP16 \
44 NOP16 \
45 NOP16
47 #define NOP256 \
48 NOP64 \
49 NOP64 \
50 NOP64 \
51 NOP64
53 #if defined(lint)
55 void *
56 getfp(void)
58 return (NULL);
61 #ifndef UMEM_STANDALONE
62 void
63 _breakpoint(void)
65 return;
67 #endif
69 #else /* lint */
71 #if defined(__amd64)
73 ENTRY(getfp)
74 movq %rbp, %rax
75 ret
76 SET_SIZE(getfp)
78 #else /* __i386 */
80 ENTRY(getfp)
81 movl %ebp, %eax
82 ret
83 SET_SIZE(getfp)
85 #endif
87 #ifndef UMEM_STANDALONE
88 ENTRY(_breakpoint)
89 int $3
90 ret
91 SET_SIZE(_breakpoint)
92 #endif
94 ENTRY(_malloc)
95 jmp umem_malloc;
96 NOP256
97 NOP256
98 #if defined(__amd64)
99 NOP64
100 #endif
101 SET_SIZE(_malloc)
103 ENTRY(_free)
104 jmp umem_malloc_free;
105 NOP256
106 NOP256
107 #if defined(__amd64)
108 NOP64
109 #endif
110 SET_SIZE(_free)
112 ANSI_PRAGMA_WEAK2(malloc,_malloc,function)
113 ANSI_PRAGMA_WEAK2(free,_free,function)
115 #endif /* lint */