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

Subversion Repositories or1k

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

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

Line No. Rev Author Line
1 53 lampret
/* Simple setjmp/longjmp for the OpenRISC 1000 (OR32 ISA).
2
   Damjan Lampret, OpenCores.org, Aug 15 2000.  */
3
 
4 70 lampret
/* Until OR1K Arch is fixed, we just save entire register file. Should be fixed eventually. */
5
 
6 53 lampret
        .align  4
7
        .proc   setjmp
8
        .global setjmp
9
        .extern setjmp
10
setjmp:
11
        l.sw    0(r3),r1
12
        l.sw    4(r3),r2
13 70 lampret
        l.sw    8(r3),r3
14
        l.sw    12(r3),r4
15
        l.sw    16(r3),r5
16
        l.sw    20(r3),r6
17
        l.sw    24(r3),r7
18
        l.sw    28(r3),r8
19
        l.sw    32(r3),r9
20
        l.sw    36(r3),r10
21
        l.sw    40(r3),r11
22
        l.sw    44(r3),r12
23
        l.sw    48(r3),r13
24
        l.sw    52(r3),r14
25
        l.sw    56(r3),r15
26
        l.sw    60(r3),r16
27
        l.sw    64(r3),r17
28
        l.sw    68(r3),r18
29
        l.sw    72(r3),r19
30
        l.sw    76(r3),r20
31
        l.sw    80(r3),r21
32
        l.sw    84(r3),r22
33
        l.sw    88(r3),r23
34
        l.sw    92(r3),r24
35
        l.sw    96(r3),r25
36
        l.sw    100(r3),r26
37
        l.sw    104(r3),r27
38
        l.sw    108(r3),r28
39 71 lampret
        l.sw    112(r3),r29
40 70 lampret
        l.sw    116(r3),r30
41
        l.sw    120(r3),r31
42
/*
43 71 lampret
        l.addi  r4,r0,SPR_SR
44 70 lampret
        l.mfsr  r4,r4
45 71 lampret
        l.sw    124(r3),r4
46 70 lampret
*/
47
        l.jr    r11
48 53 lampret
        l.addi  r3,r0,0
49
.endproc setjmp
50
 
51
        .align  4
52
        .proc   longjmp
53
        .global longjmp
54
longjmp:
55
        l.lw    r1,0(r3)
56
        l.lw    r2,4(r3)
57 70 lampret
        l.lw    r5,16(r3)
58
        l.lw    r6,20(r3)
59
        l.lw    r7,24(r3)
60
        l.lw    r8,28(r3)
61
        l.lw    r9,32(r3)
62
        l.lw    r10,36(r3)
63
        l.lw    r11,40(r3)
64
        l.lw    r12,44(r3)
65
        l.lw    r13,48(r3)
66
        l.lw    r14,52(r3)
67
        l.lw    r15,56(r3)
68
        l.lw    r16,60(r3)
69
        l.lw    r17,64(r3)
70
        l.lw    r18,68(r3)
71
        l.lw    r19,72(r3)
72
        l.lw    r20,76(r3)
73
        l.lw    r21,80(r3)
74
        l.lw    r22,84(r3)
75
        l.lw    r23,88(r3)
76
        l.lw    r24,92(r3)
77
        l.lw    r25,96(r3)
78
        l.lw    r26,100(r3)
79
        l.lw    r27,104(r3)
80
        l.lw    r28,108(r3)
81
        l.lw    r29,112(r3)
82
        l.lw    r30,116(r3)
83
        l.lw    r31,120(r3)
84
/*
85 71 lampret
        l.lw    r5,124(r3)
86 70 lampret
        l.addi  r3,r0,SPR_ESR_BASE
87
        l.mtsr  r3,r5
88
*/
89
        l.lw    r5,16(r3)
90
        l.sfne  r4,r0
91
        l.bf    1f
92
        l.nop
93
 
94
        l.addi  r3,r0,1
95 53 lampret
 
96 70 lampret
1:      l.addi  r3,r4,0
97 53 lampret
        l.jr    r11
98 70 lampret
        l.nop
99 53 lampret
.endproc longjmp

powered by: WebSVN 2.1.0

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