xref: /illumos-gate/usr/src/lib/libumem/sparc/asm_subr.S (revision 34bbc83afbf22a6f8e504cb99d76c97c017cb5f4)
1/*
2 * CDDL HEADER START
3 *
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.
8 *
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.
13 *
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]
19 *
20 * CDDL HEADER END
21 */
22/*
23 * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
24 * Use is subject to license terms.
25 */
26
27#include <sys/asm_linkage.h>
28
29#if defined(lint)
30
31void *
32getfp(void)
33{
34	return (NULL);
35}
36
37void
38flush_windows(void)
39{
40
41}
42
43#ifndef UMEM_STANDALONE
44void
45_breakpoint(void)
46{
47	return;
48}
49#endif
50
51#else	/* lint */
52
53	ENTRY(getfp)
54	retl
55	mov	%fp, %o0
56	SET_SIZE(getfp)
57
58#ifdef UMEM_STANDALONE
59#ifdef __sparcv9
60
61	/*
62	 * The caller doesn't need the top window to be flushed, so this
63	 * is sufficient.
64	 */
65	ENTRY(flush_windows)
66	retl
67	flushw
68	SET_SIZE(flush_windows)
69
70#else	/* !__sparcv9 */
71#error	"This file does not provide a pre-v9 standalone flush_windows"
72#endif	/* __sparcv9 */
73
74#else	/* !UMEM_STANDALONE */
75
76	ENTRY(flush_windows)
77	retl
78	ta	0x3
79	SET_SIZE(flush_windows)
80
81#endif	/* UMEM_STANDALONE */
82
83#ifndef UMEM_STANDALONE
84	ENTRY(_breakpoint)
85	retl
86	ta	0x1
87	SET_SIZE(_breakpoint)
88#endif
89
90#endif	/* lint */
91