1/* Copyright (C) 2001-2020 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 3, or (at your option) any 7later version. 8 9This file is distributed in the hope that it will be useful, but 10WITHOUT ANY WARRANTY; without even the implied warranty of 11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12General Public License for more details. 13 14Under Section 7 of GPL version 3, you are granted additional 15permissions described in the GCC Runtime Library Exception, version 163.1, as published by the Free Software Foundation. 17 18You should have received a copy of the GNU General Public License and 19a copy of the GCC Runtime Library Exception along with this program; 20see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 21<http://www.gnu.org/licenses/>. */ 22 23% This must be the last file on the link-line, allocating global registers 24% from the top. 25 26% Register $254 is the stack-pointer. 27sp GREG 28 29% Register $253 is frame-pointer. It's not supposed to be used in most 30% functions. 31fp GREG 32 33% $252 is the static chain register; nested functions receive the 34% context of the surrounding function through a pointer passed in this 35% register. 36static_chain GREG 37struct_value_reg GREG 38 39% These registers are used to pass state at an exceptional return (C++). 40eh_state_3 GREG 41eh_state_2 GREG 42eh_state_1 GREG 43eh_state_0 GREG 44 45#ifdef __MMIX_ABI_GNU__ 46 47% Allocate global registers used by the GNU ABI. 48gnu_parm_reg_16 GREG 49gnu_parm_reg_15 GREG 50gnu_parm_reg_14 GREG 51gnu_parm_reg_13 GREG 52gnu_parm_reg_12 GREG 53gnu_parm_reg_11 GREG 54gnu_parm_reg_10 GREG 55gnu_parm_reg_9 GREG 56gnu_parm_reg_8 GREG 57gnu_parm_reg_7 GREG 58gnu_parm_reg_6 GREG 59gnu_parm_reg_5 GREG 60gnu_parm_reg_4 GREG 61gnu_parm_reg_3 GREG 62gnu_parm_reg_2 GREG 63gnu_parm_reg_1 GREG 64 65#endif /* __MMIX_ABI_GNU__ */ 66 67% Provide last part of _init and _fini. 68 69% The return address is stored in the topmost stored register in the 70% register-stack. We ignore the current value in rJ. It is probably 71% garbage because each fragment of _init and _fini may have their own idea 72% of the current stack frame, if they're cut out from a "real" function 73% like in gcc/crtstuff.c. 74 75 .section .init,"ax",@progbits 76 GETA $255,0F 77 PUT rJ,$255 78 POP 0,0 790H PUT rJ,$0 80 POP 0,0 81 82 .section .fini,"ax",@progbits 83 GETA $255,0F 84 PUT rJ,$255 85 POP 0,0 860H PUT rJ,$0 87 POP 0,0 88