OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [newlib/] [newlib/] [libc/] [machine/] [sh/] [setjmp.S] - Blame information for rev 1774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 39 lampret
#include "asm.h"
2
 
3
ENTRY(setjmp)
4 56 joel
#if defined (__SH3E__) || defined(__SH4_SINGLE__) || defined(__SH4__) || defined(__SH4_SINGLE_ONLY__)
5 39 lampret
        add     #(13*4),r4
6
#else
7
        add     #(9*4),r4
8
#endif
9
 
10
        sts.l   pr,@-r4
11
 
12 56 joel
#if defined (__SH3E__) || defined(__SH4_SINGLE__) || defined(__SH4__) || defined(__SH4_SINGLE_ONLY__)
13 39 lampret
        fmov.s  fr15,@-r4       ! call saved floating point registers
14
        fmov.s  fr14,@-r4
15
        fmov.s  fr13,@-r4
16
        fmov.s  fr12,@-r4
17
#endif
18
 
19
        mov.l   r15,@-r4        ! call saved integer registers
20
        mov.l   r14,@-r4
21
        mov.l   r13,@-r4
22
        mov.l   r12,@-r4
23
 
24
        mov.l   r11,@-r4
25
        mov.l   r10,@-r4
26
        mov.l   r9,@-r4
27
        mov.l   r8,@-r4
28
 
29
        rts
30
        mov    #0,r0
31
 
32
ENTRY(longjmp)
33
        mov.l   @r4+,r8
34
        mov.l   @r4+,r9
35
        mov.l   @r4+,r10
36
        mov.l   @r4+,r11
37
 
38
        mov.l   @r4+,r12
39
        mov.l   @r4+,r13
40
        mov.l   @r4+,r14
41
        mov.l   @r4+,r15
42
 
43 56 joel
#if defined (__SH3E__) || defined(__SH4_SINGLE__) || defined(__SH4__) || defined(__SH4_SINGLE_ONLY__)
44 39 lampret
        fmov.s  @r4+,fr12       ! call saved floating point registers
45
        fmov.s  @r4+,fr13
46
        fmov.s  @r4+,fr14
47
        fmov.s  @r4+,fr15
48
#endif
49
 
50
        lds.l   @r4+,pr
51
 
52
        mov     r5,r0
53
        tst     r0,r0
54
        bf      retr4
55
        movt    r0
56
retr4:  rts
57
        nop

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.