summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/h8300/bsd-_setjmp.S
blob: 766d9cc910c8d79435a26caca47b7fad9ed4aecf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. H8/300 version. */

#include <jmpbuf-offsets.h>

#ifdef __H8300S__
	.h8300s
#else
	.h8300h
#endif
	.text

.global _setjmp

_setjmp:
	add.l	#JB_SIZE,er0
	mov.l	@sp,er1		; return PC
	mov.l	er1,@-er0
	mov.l	sp,@-er0
	mov.l	er6,@-er0
	mov.l	er5,@-er0
	mov.l	er4,@-er0
	mov.l	er0,er1
	sub.l	er0,er0
	mov.l	er0,@(JB_SIZE:16,er1)
	rts

	.end