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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [config/] [mmix/] [crtn.asm] - Blame information for rev 820

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

Line No. Rev Author Line
1 38 julius
/* Copyright (C) 2001, 2002 Free Software Foundation, Inc.
2
   Contributed by Hans-Peter Nilsson 
3
 
4
This file is free software; you can redistribute it and/or modify it
5
under the terms of the GNU General Public License as published by the
6
Free Software Foundation; either version 2, or (at your option) any
7
later version.
8
 
9
In addition to the permissions in the GNU General Public License, the
10
Free Software Foundation gives you unlimited permission to link the
11
compiled version of this file into combinations with other programs,
12
and to distribute those combinations without any restriction coming
13
from the use of this file.  (The General Public License restrictions
14
do apply in other respects; for example, they cover modification of
15
the file, and distribution when not linked into a combine
16
executable.)
17
 
18
This file is distributed in the hope that it will be useful, but
19
WITHOUT ANY WARRANTY; without even the implied warranty of
20
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
21
General Public License for more details.
22
 
23
You should have received a copy of the GNU General Public License
24
along with this program; see the file COPYING.  If not, write to
25
the Free Software Foundation, 51 Franklin Street, Fifth Floor,
26
Boston, MA 02110-1301, USA.  */
27
 
28
% This must be the last file on the link-line, allocating global registers
29
% from the top.
30
 
31
% Register $254 is the stack-pointer.
32
sp GREG
33
 
34
% Register $253 is frame-pointer.  It's not supposed to be used in most
35
% functions.
36
fp GREG
37
 
38
% $252 is the static chain register; nested functions receive the
39
% context of the surrounding function through a pointer passed in this
40
% register.
41
static_chain GREG
42
struct_value_reg GREG
43
 
44
% These registers are used to pass state at an exceptional return (C++).
45
eh_state_3 GREG
46
eh_state_2 GREG
47
eh_state_1 GREG
48
eh_state_0 GREG
49
 
50
#ifdef __MMIX_ABI_GNU__
51
 
52
% Allocate global registers used by the GNU ABI.
53
gnu_parm_reg_16 GREG
54
gnu_parm_reg_15 GREG
55
gnu_parm_reg_14 GREG
56
gnu_parm_reg_13 GREG
57
gnu_parm_reg_12 GREG
58
gnu_parm_reg_11 GREG
59
gnu_parm_reg_10 GREG
60
gnu_parm_reg_9 GREG
61
gnu_parm_reg_8 GREG
62
gnu_parm_reg_7 GREG
63
gnu_parm_reg_6 GREG
64
gnu_parm_reg_5 GREG
65
gnu_parm_reg_4 GREG
66
gnu_parm_reg_3 GREG
67
gnu_parm_reg_2 GREG
68
gnu_parm_reg_1 GREG
69
 
70
#endif /* __MMIX_ABI_GNU__ */
71
 
72
% Provide last part of _init and _fini.
73
 
74
% The return address is stored in the topmost stored register in the
75
% register-stack.  We ignore the current value in rJ.  It is probably
76
% garbage because each fragment of _init and _fini may have their own idea
77
% of the current stack frame, if they're cut out from a "real" function
78
% like in gcc/crtstuff.c.
79
 
80
        .section .init,"ax",@progbits
81
        GETA    $255,0F
82
        PUT     rJ,$255
83
        POP     0,0
84
0H      PUT     rJ,$0
85
        POP     0,0
86
 
87
        .section .fini,"ax",@progbits
88
        GETA    $255,0F
89
        PUT     rJ,$255
90
        POP     0,0
91
0H      PUT     rJ,$0
92
        POP     0,0

powered by: WebSVN 2.1.0

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