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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [newlib-1.17.0/] [newlib/] [libc/] [machine/] [mt/] [setjmp.S] - Blame information for rev 831

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

Line No. Rev Author Line
1 148 jeremybenn
# setjmp/longjmp for mt.
2
#
3
# The jmpbuf looks like this:
4
#
5
# Register      jmpbuf offset
6
# R0            ---             --
7
# R1            0x4              4
8
# R2            0x8              8
9
# R3            0xc             12
10
# R4            0x10            16
11
# R5            0x14            20
12
# R6            0x18            24
13
# R7            0x1c            28
14
# R8            0x20            32
15
# R9            ----            --
16
# R10           ----            --
17
# R11           0x2c            44
18
# R12           0x30            48
19
# R13           0x34            52
20
# R14           0x38            56
21
# R15           0x3c            60
22
#
23
# R1 contains the pointer to jmpbuf
24
        .text
25
        .global setjmp
26
        .type   setjmp ,@function
27
setjmp:
28
 
29
        stw     r1, r1, #4
30
        or      r0, r0, r0
31
        stw     r2, r1, #8
32
        or      r0, r0, r0
33
        stw     r3, r1, #12
34
        or      r0, r0, r0
35
        stw     r4, r1, #16
36
        or      r0, r0, r0
37
        stw     r5, r1, #20
38
        or      r0, r0, r0
39
        stw     r6, r1, #24
40
        or      r0, r0, r0
41
        stw     r7, r1, #28
42
        or      r0, r0, r0
43
        stw     r8, r1, #32
44
        or      r0, r0, r0
45
        stw     r11, r1, #44
46
        or      r0, r0, r0
47
        stw     r12, r1, #48
48
        or      r0, r0, r0
49
        stw     r13, r1, #52
50
        or      r0, r0, r0
51
        stw     r14, r1, #56
52
        or      r0, r0, r0
53
        stw     r15, r1, #60
54
 
55
        jal     r0, r14
56
        addi    r11, r0, #0
57
.Lend1:
58
        .size   setjmp,.Lend1-setjmp
59
 
60
        .global longjmp
61
        .type   longjmp,@function
62
longjmp:
63
        or      r9, r1, r1
64
        or      r11, r2, r2
65
        ldw     r1, r1, #4
66
        or      r0, r0, r0
67
        ldw     r2, r1, #8
68
        or      r0, r0, r0
69
        ldw     r3, r1, #12
70
        or      r0, r0, r0
71
        ldw     r4, r1, #16
72
        or      r0, r0, r0
73
        ldw     r5, r1, #20
74
        or      r0, r0, r0
75
        ldw     r6, r1, #24
76
        or      r0, r0, r0
77
        ldw     r7, r1, #28
78
        or      r0, r0, r0
79
        ldw     r8, r1, #32
80
        or      r0, r0, r0
81
 
82
 
83
        ldw     r12, r1, #48
84
        or      r0, r0, r0
85
        ldw     r13, r1, #52
86
        or      r0, r0, r0
87
        ldw     r14, r1, #56
88
        or      r0, r0, r0
89
        ldw     r15, r1, #60
90
 
91
        brne    r0, r11, .L01
92
        or      r0, r0, r0
93
 
94
        addi    r11, r0, #1
95
.L01:
96
        jal     r0, r14
97
        or      r0, r0, r0
98
.Lend2:
99
        .size   longjmp,.Lend2-longjmp2

powered by: WebSVN 2.1.0

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