1 /* Copyright
(C
) 2001, 2002 Free Software Foundation
, Inc.
2 Contributed by Hans
-Peter Nilsson
<hp
@bitrange.com
>
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
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
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.
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.
*/
28 % This must be the last file on the link
-line
, allocating
global registers
31 % Register
$254 is the stack
-pointer.
34 % Register
$253 is frame
-pointer. It
's not supposed to be used in most
38 % $252 is the static chain register; nested functions receive the
39 % context of the surrounding function through a pointer passed in this
44 % These registers are used to pass state at an exceptional return (C++).
50 #ifdef __MMIX_ABI_GNU__
52 % Allocate global registers used by the GNU ABI.
70 #endif /* __MMIX_ABI_GNU__ */
72 % Provide last part of _init and _fini.
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.
80 .
section .init
,"ax",@progbits
87 .
section .fini
,"ax",@progbits