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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [newlib-1.18.0/] [newlib/] [libc/] [machine/] [xstormy16/] [setjmp.S] - Blame information for rev 816

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

Line No. Rev Author Line
1 207 jeremybenn
;;  xstormy16
2
;;   Copyright (C) 2001 by  Red Hat, Incorporated. All rights reserved.
3
;;
4
;; Permission to use, copy, modify, and distribute this software
5
;; is freely granted, provided that this notice is preserved.
6
;;
7
        .file "setjmp.S"
8
 
9
        .section .text
10
        .align 1
11
        .global setjmp
12
        .type setjmp,@function
13
setjmp:
14
        mov r0,r10
15
        mov (r2++),r0
16
        mov r0,r11
17
        mov (r2++),r0
18
        mov r0,r12
19
        mov (r2++),r0
20
        mov r0,r13
21
        mov (r2++),r0
22
        pop r0                  ; PC high word
23
        pop r1                  ; PC low word
24
        mov (r2++), r0
25
        mov (r2++), r1
26
        mov r3,sp
27
        mov (r2++),r3
28
        mov.w r2,#0
29
        mov r8, r0
30
        mov r9, r1
31
        jmp r8, r9
32
        .size setjmp,.-setjmp
33
 
34
        .global longjmp
35
        .type longjmp,@function
36
longjmp:
37
        mov r0,(r2++)
38
        mov r10,r0
39
        mov r0,(r2++)
40
        mov r11,r0
41
        mov r0,(r2++)
42
        mov r12,r0
43
        mov r0,(r2++)
44
        mov r13,r0
45
        mov r0,(r2++)
46
        mov r8, r0
47
        mov r1,(r2++)
48
        mov r9, r1
49
        mov r4,(r2++)
50
        mov sp,r4
51
;; status arg (r3) to longjmp is return value
52
;; if it's zero, return 1
53
        bnz r3, #0, 0f
54
        mov.w r3,#1
55
0:      mov r2, r3
56
        jmp r8,r9
57
        .size longjmp,.-longjmp

powered by: WebSVN 2.1.0

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