xref: /onnv-gate/usr/src/cmd/dtrace/test/tst/sparc/pid/tst.embedded.s (revision 3944:75371f172291)
12633Sahl/*
22633Sahl * CDDL HEADER START
32633Sahl *
42633Sahl * The contents of this file are subject to the terms of the
52633Sahl * Common Development and Distribution License (the "License").
62633Sahl * You may not use this file except in compliance with the License.
72633Sahl *
82633Sahl * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
92633Sahl * or http://www.opensolaris.org/os/licensing.
102633Sahl * See the License for the specific language governing permissions
112633Sahl * and limitations under the License.
122633Sahl *
132633Sahl * When distributing Covered Code, include this CDDL HEADER in each
142633Sahl * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
152633Sahl * If applicable, add the following below this CDDL HEADER, with the
162633Sahl * fields enclosed by brackets "[]" replaced with your own identifying
172633Sahl * information: Portions Copyright [yyyy] [name of copyright owner]
182633Sahl *
192633Sahl * CDDL HEADER END
202633Sahl */
212633Sahl
222633Sahl/*
23*3944Sahl * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
242633Sahl * Use is subject to license terms.
252633Sahl */
262633Sahl
272633Sahl#pragma ident	"%Z%%M%	%I%	%E% SMI"
282633Sahl
292633Sahl#include <sys/asm_linkage.h>
302633Sahl
31*3944Sahl	DGDEF(__fsr_init_value)
32*3944Sahl	.word 0
33*3944Sahl
342633Sahl	ENTRY(waiting)
352633Sahl	retl
362633Sahl	ldub	[%o0], %o0
372633Sahl	SET_SIZE(waiting)
382633Sahl
392633Sahl	ENTRY(main)
402633Sahl	save	%sp, -SA(MINFRAME + 4), %sp
412633Sahl	stb	%g0, [%fp - 4]
422633Sahl1:
432633Sahl	call	waiting
442633Sahl	sub	%fp, 4, %o0
452633Sahl	tst	%o0
462633Sahl	bz	1b
472633Sahl	nop
482633Sahl
492633Sahl	restore
502633Sahl
512633Sahl	ALTENTRY(inner)
522633Sahl	nop
532633Sahl	nop
542633Sahl	nop
552633Sahl	SET_SIZE(inner)
562633Sahl
572633Sahl	retl
582633Sahl	clr	%o0
592633Sahl	SET_SIZE(main)
60