summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/h8300/__longjmp.S
blob: 2233644d0f6b41a4cb4c7acd9d36c1c5ba40dbb1 (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
#define _ASM
#define _SETJMP_H
#include <bits/setjmp.h>

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

___longjmp:
	mov.l	er1,er1
	bne	1f
	sub.l	er1,er1
	inc.l	#1,er1
1:
	mov.l	@er0+,er4
	mov.l	@er0+,er5
	mov.l	@er0+,er6
	mov.l	@er0+,sp
	mov.l	@er0+,er3	; return PC
	adds	#4,sp		; adjust return stack
	jmp	@er3