xref: /illumos-gate/usr/src/cmd/sgs/rtld/sparc/caller.S (revision e3ae4b35c024af1196582063ecee3ab79367227d)
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 * Return the pc of the calling routine.
27 */
28
29#if	defined(lint)
30
31#include	<sys/types.h>
32
33caddr_t
34caller()
35{
36	return (0);
37}
38
39/* ARGSUSED */
40void
41set_sparc_g1(ulong_t val)
42{
43	return;
44}
45
46/* ARGSUSED */
47void
48set_sparc_g2(ulong_t val)
49{
50	return;
51}
52
53/* ARGSUSED */
54void
55set_sparc_g3(ulong_t val)
56{
57	return;
58}
59
60/* ARGSUSED */
61void
62set_sparc_g4(ulong_t val)
63{
64	return;
65}
66
67/* ARGSUSED */
68void
69set_sparc_g5(ulong_t val)
70{
71	return;
72}
73
74/* ARGSUSED */
75void
76set_sparc_g6(ulong_t val)
77{
78	return;
79}
80
81/* ARGSUSED */
82void
83set_sparc_g7(ulong_t val)
84{
85	return;
86}
87
88#else
89
90#include	<sys/asm_linkage.h>
91
92	.file	"caller.s"
93
94	ENTRY(caller)
95	retl
96	mov	%i7, %o0
97	SET_SIZE(caller)
98
99	ENTRY(set_sparc_g1)
100	retl
101	mov	%o0, %g1
102	SET_SIZE(set_sparc_g1)
103
104	ENTRY(set_sparc_g2)
105	retl
106	mov	%o0, %g2
107	SET_SIZE(set_sparc_g2)
108
109	ENTRY(set_sparc_g3)
110	retl
111	mov	%o0, %g3
112	SET_SIZE(set_sparc_g3)
113
114	ENTRY(set_sparc_g4)
115	retl
116	mov	%o0, %g4
117	SET_SIZE(set_sparc_g4)
118
119	ENTRY(set_sparc_g5)
120	retl
121	mov	%o0, %g5
122	SET_SIZE(set_sparc_g5)
123
124	ENTRY(set_sparc_g6)
125	retl
126	mov	%o0, %g6
127	SET_SIZE(set_sparc_g6)
128
129	ENTRY(set_sparc_g7)
130	retl
131	mov	%o0, %g7
132	SET_SIZE(set_sparc_g7)
133#endif
134