1/*
2Copyright (c) 1990 The Regents of the University of California.
3All rights reserved.
4
5Redistribution and use in source and binary forms are permitted
6provided that the above copyright notice and this paragraph are
7duplicated in all such forms and that any documentation,
8and/or other materials related to such
9distribution and use acknowledge that the software was developed
10by the University of California, Berkeley.  The name of the
11University may not be used to endorse or promote products derived
12from this software without specific prior written permission.
13THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
16 */
17!
18	.file	"setjmp.S"
19	.section .text
20
21	.global	_setjmp
22_setjmp:
23	mov.w	r7,@r0+
24	mov.w	r6,@r0+
25	mov.w	r5,@r0+
26	mov.w	@sp,r1
27	mov.w	r1,@r0
28	clr.w	r0
29	rts
30
31	.global	_longjmp
32_longjmp:
33	mov.w	@r0+,r7
34	mov.w	@r0+,r6
35	mov.w	@r0+,r5
36	mov.w	@r0,r2
37	mov.w	r2,@sp
38	mov.w	r1,r0
39	tst.w	r0
40	bne	.L1
41	mov.w	#1,r0
42.L1:
43	rts
44