repo.or.cz
/
zpugcc
/
jano.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
fixes for host gcc 4.6.1
[zpugcc/jano.git]
/
toolchain
/
gcc
/
newlib
/
libc
/
machine
/
h8300
/
setjmp.S
blob
c6661a926c77fd1bf0ac818c0ee01057e482afdb
1
#include "setarch.h"
2
3
.file "setjmp.S"
4
5
.section .text
6
.align 2
7
.global _setjmp
8
_setjmp:
9
#if defined(__H8300H__) || defined(__H8300S__)
10
mov.l er7,@er0
11
mov.l er6,@(4,er0)
12
mov.l er5,@(8,er0)
13
mov.l er4,@(12,er0)
14
mov.l @sp,er1
15
mov.l er1,@(16,er0)
16
sub.l er0,er0
17
#else
18
mov.w r7,@r0
19
mov.w r6,@(2,r0)
20
mov.w r5,@(4,r0)
21
mov.w r4,@(6,r0)
22
mov.w @sp,r1
23
mov.w r1,@(8,r0)
24
sub.w r0,r0
25
#endif
26
rts
27
28
.global _longjmp
29
_longjmp:
30
#if defined(__H8300H__) || defined (__H8300S__)
31
mov.l @er0+,er7
32
mov.l @er0+,er6
33
mov.l @er0+,er5
34
mov.l @er0+,er4
35
mov.l @er0,er2
36
mov.l er2,@sp
37
#if (__INT_MAX__ <= 32767)
38
mov.w r1,r0
39
#else
40
mov.l er1,er0
41
#endif
42
bne .L1
43
sub er0,er0
44
adds #1,er0
45
#else
46
mov.w @r0+,r7
47
mov.w @r0+,r6
48
mov.w @r0+,r5
49
mov.w @r0+,r4
50
mov.w @r0,r2
51
mov.w r2,@sp
52
mov.w r1,r0
53
bne .L1
54
mov.w #1,r0
55
#endif
56
.L1:
57
rts