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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [newlib/] [newlib/] [libc/] [machine/] [m68k/] [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
/* These are predefined by new versions of GNU cpp.  */
2
 
3
#ifndef __USER_LABEL_PREFIX__
4
#define __USER_LABEL_PREFIX__ _
5
#endif
6
 
7
#ifndef __REGISTER_PREFIX__
8
#define __REGISTER_PREFIX__
9
#endif
10
 
11
/* ANSI concatenation macros.  */
12
 
13
#define CONCAT1(a, b) CONCAT2(a, b)
14
#define CONCAT2(a, b) a ## b
15
 
16
/* Use the right prefix for global labels.  */
17
 
18
#define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
19
 
20
/* Use the right prefix for registers.  */
21
 
22
#define REG(x) CONCAT1 (__REGISTER_PREFIX__, x)
23
 
24
#define d0 REG (d0)
25
#define d1 REG (d1)
26
#define d2 REG (d2)
27
#define d3 REG (d3)
28
#define d4 REG (d4)
29
#define d5 REG (d5)
30
#define d6 REG (d6)
31
#define d7 REG (d7)
32
#define a0 REG (a0)
33
#define a1 REG (a1)
34
#define a2 REG (a2)
35
#define a3 REG (a3)
36
#define a4 REG (a4)
37
#define a5 REG (a5)
38
#define a6 REG (a6)
39
#define fp REG (fp)
40
#define sp REG (sp)
41
 
42
.global SYM (setjmp)
43
.global SYM (longjmp)
44
 
45
SYM (setjmp):
46
        moveal sp@(4),a0
47
        movel sp@(0),a0@(12)
48
        movel sp,a0@(8)
49
        moveml d2-d7/a2-a6,a0@(20)
50
        clrl d0
51
        rts
52
 
53
SYM (longjmp):
54
        moveal sp@(4),a0
55
        movel sp@(8),d0
56
        bne 1f
57
        movel &1,d0
58
1:
59
        moveml a0@(20),d2-d7/a2-a6
60
        moveal a0@(8),sp
61
        movel a0@(12),sp@
62
        rts
63
 
64
#ifdef M68881
65
.global SYM (setjmp_68881)
66
.global SYM (longjmp_68881)
67
 
68
SYM (setjmp_68881):
69
        moveal sp@(4),a0
70
        movel sp@(0),a0@(12)
71
        movel sp,a0@(8)
72
        moveml d2-d7/a2-a6,a0@(20)
73
        fmovemx fp2-fp7,a0@(64)
74
        clrl d0
75
        rts
76
 
77
SYM (longjmp_68881):
78
        moveal sp@(4),a0
79
        fmovemx a0@(64),fp2-fp7
80
        movel sp@(8),d0
81
        bne 1f
82
        movel &1,d0
83
1:
84
        moveml a0@(20),d2-d7/a2-a6
85
        moveal a0@(8),sp
86
        movel a0@(12),sp@
87
        rts
88
#endif

powered by: WebSVN 2.1.0

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