1/* Copyright (C) 2001, 2002 Free Software Foundation, Inc. 2 Contributed by Hans-Peter Nilsson <hp@bitrange.com> 3 4This file is free software; you can redistribute it and/or modify it 5under the terms of the GNU General Public License as published by the 6Free Software Foundation; either version 2, or (at your option) any 7later version. 8 9In addition to the permissions in the GNU General Public License, the 10Free Software Foundation gives you unlimited permission to link the 11compiled version of this file into combinations with other programs, 12and to distribute those combinations without any restriction coming 13from the use of this file. (The General Public License restrictions 14do apply in other respects; for example, they cover modification of 15the file, and distribution when not linked into a combine 16executable.) 17 18This file is distributed in the hope that it will be useful, but 19WITHOUT ANY WARRANTY; without even the implied warranty of 20MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 21General Public License for more details. 22 23You should have received a copy of the GNU General Public License 24along with this program; see the file COPYING. If not, write to 25the Free Software Foundation, 51 Franklin Street, Fifth Floor, 26Boston, 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. 32sp GREG 33 34% Register $253 is frame-pointer. It's not supposed to be used in most 35% functions. 36fp 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. 41static_chain GREG 42struct_value_reg GREG 43 44% These registers are used to pass state at an exceptional return (C++). 45eh_state_3 GREG 46eh_state_2 GREG 47eh_state_1 GREG 48eh_state_0 GREG 49 50#ifdef __MMIX_ABI_GNU__ 51 52% Allocate global registers used by the GNU ABI. 53gnu_parm_reg_16 GREG 54gnu_parm_reg_15 GREG 55gnu_parm_reg_14 GREG 56gnu_parm_reg_13 GREG 57gnu_parm_reg_12 GREG 58gnu_parm_reg_11 GREG 59gnu_parm_reg_10 GREG 60gnu_parm_reg_9 GREG 61gnu_parm_reg_8 GREG 62gnu_parm_reg_7 GREG 63gnu_parm_reg_6 GREG 64gnu_parm_reg_5 GREG 65gnu_parm_reg_4 GREG 66gnu_parm_reg_3 GREG 67gnu_parm_reg_2 GREG 68gnu_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 840H 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 910H PUT rJ,$0 92 POP 0,0 93