186535Sjake/*
286535Sjake * Copyright (c) 1995 Paul Kranenburg
386535Sjake * All rights reserved.
486535Sjake *
586535Sjake * Redistribution and use in source and binary forms, with or without
686535Sjake * modification, are permitted provided that the following conditions
786535Sjake * are met:
886535Sjake * 1. Redistributions of source code must retain the above copyright
986535Sjake *    notice, this list of conditions and the following disclaimer.
1086535Sjake * 2. Redistributions in binary form must reproduce the above copyright
1186535Sjake *    notice, this list of conditions and the following disclaimer in the
1286535Sjake *    documentation and/or other materials provided with the distribution.
1386535Sjake * 3. All advertising materials mentioning features or use of this software
1486535Sjake *    must display the following acknowledgement:
1586535Sjake *      This product includes software developed by Paul Kranenburg.
1686535Sjake * 4. The name of the author may not be used to endorse or promote products
1786535Sjake *    derived from this software without specific prior written permission
1886535Sjake *
1986535Sjake * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
2086535Sjake * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
2186535Sjake * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
2286535Sjake * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
2386535Sjake * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
2486535Sjake * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2586535Sjake * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2686535Sjake * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2786535Sjake * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
2886535Sjake * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2986535Sjake *
3086535Sjake */
3186535Sjake
3286535Sjake#include <machine/asm.h>
3399018Sobrien__FBSDID("$FreeBSD$");
3486535Sjake
3586535Sjake#include "assym.s"
3686535Sjake
3786535SjakeENTRY(sigsetjmp)
3886535Sjake	PIC_PROLOGUE(%o3, %o2)
3986535Sjake	SET(CNAME(setjmp), %o2, %o3)
4086535Sjake	SET(CNAME(_setjmp), %o2, %o4)
4186535Sjake	movrnz	%o1, %o3, %o4
4286535Sjake	jmp	%o4
4388613Sjake	 stx	%o1, [%o0 + _JB_SIGFLAG]
4486535SjakeEND(sigsetjmp)
4586535Sjake
46108736Stmm	.weak CNAME(siglongjmp);
47108736Stmm	.set CNAME(siglongjmp),CNAME(__siglongjmp);
48108736StmmENTRY(__siglongjmp)
4986535Sjake	PIC_PROLOGUE(%o3, %o2)
5086535Sjake	SET(CNAME(longjmp), %o2, %o3)
5186535Sjake	SET(CNAME(_longjmp), %o2, %o4)
5291662Sjake	ldx	[%o0 + _JB_SIGFLAG], %o2
5391662Sjake	movrnz	%o2, %o3, %o4
5486535Sjake	jmp	%o4
5586535Sjake	 nop
56108736StmmEND(__siglongjmp)
57