dmake: do not set MAKEFLAGS=k
[unleashed/tickless.git] / usr / src / lib / libumem / i386 / asm_subr.s
blob460194adbbd8f01438f39e40308dac0c64cb83eb
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
54 #if defined(__amd64)
56 ENTRY(getfp)
57 movq %rbp, %rax
58 ret
59 SET_SIZE(getfp)
61 #else /* __i386 */
63 ENTRY(getfp)
64 movl %ebp, %eax
65 ret
66 SET_SIZE(getfp)
68 #endif
70 #ifndef UMEM_STANDALONE
71 ENTRY(_breakpoint)
72 int $3
73 ret
74 SET_SIZE(_breakpoint)
75 #endif
77 ENTRY(_malloc)
78 jmp umem_malloc;
79 NOP256
80 NOP256
81 #if defined(__amd64)
82 NOP64
83 #endif
84 SET_SIZE(_malloc)
86 ENTRY(_free)
87 jmp umem_malloc_free;
88 NOP256
89 NOP256
90 #if defined(__amd64)
91 NOP64
92 #endif
93 SET_SIZE(_free)
95 ANSI_PRAGMA_WEAK2(malloc,_malloc,function)
96 ANSI_PRAGMA_WEAK2(free,_free,function)