1 /* PLT trampolines. m68k version.
2 Copyright (C) 2005-2014 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
21 #if !defined (__mcoldfire__)
22 # define FMOVE fmove.x
24 #elif defined (__mcffpu__)
25 # define FMOVE fmove.d
32 .globl _dl_runtime_resolve
33 .type _dl_runtime_resolve, @function
36 cfi_adjust_cfa_offset (8)
37 | Save %a0 (struct return address) and %a1.
39 cfi_adjust_cfa_offset (4)
41 cfi_adjust_cfa_offset (4)
42 | Call the real address resolver.
44 | Restore register %a0 and %a1.
46 cfi_adjust_cfa_offset (-4)
48 cfi_adjust_cfa_offset (-4)
51 cfi_adjust_cfa_offset (-8)
55 cfi_adjust_cfa_offset (4)
61 .size _dl_runtime_resolve, . - _dl_runtime_resolve
64 .globl _dl_runtime_profile
65 .type _dl_runtime_profile, @function
68 cfi_adjust_cfa_offset (8)
70 cfi_adjust_cfa_offset (4)
72 cfi_adjust_cfa_offset (4)
74 cfi_adjust_cfa_offset (4)
76 cfi_adjust_cfa_offset (4)
77 | Push parameters for _dl_profile_fixup
79 cfi_adjust_cfa_offset (4)
81 cfi_adjust_cfa_offset (4)
82 move.l 32(%sp), -(%sp)
83 cfi_adjust_cfa_offset (4)
84 move.l 32(%sp), -(%sp)
85 cfi_adjust_cfa_offset (4)
86 move.l 32(%sp), -(%sp)
87 cfi_adjust_cfa_offset (4)
89 cfi_adjust_cfa_offset (8)
90 | Call the real address resolver.
91 jbsr _dl_profile_fixup
94 cfi_adjust_cfa_offset (-28)
98 cfi_adjust_cfa_offset (-4)
99 | Restore register %a0 and %a1.
101 cfi_adjust_cfa_offset (-4)
103 cfi_adjust_cfa_offset (-4)
105 cfi_adjust_cfa_offset (-12)
106 | Call real function.
109 cfi_adjust_cfa_offset (4)
125 cfi_adjust_cfa_offset (20)
127 cfi_adjust_cfa_offset (24)
130 cfi_rel_offset (%a2, 0)
134 | Round framesize up to longword alignment
139 cfi_def_cfa_register (%a2)
143 1: move.l (%a1)+, (%a0)+
150 1: move.l (%a1)+, (%a0)+
154 %a2+24 return address
161 %sp copied stack frame
175 cfi_def_cfa_register (%sp)
177 cfi_adjust_cfa_offset (4)
189 cfi_adjust_cfa_offset (FPSPACE)
192 cfi_adjust_cfa_offset (4)
194 cfi_adjust_cfa_offset (4)
196 cfi_adjust_cfa_offset (4)
198 cfi_adjust_cfa_offset (4)
199 pea (16+FPSPACE)(%sp)
200 cfi_adjust_cfa_offset (4)
201 move.l (32+FPSPACE)(%sp), -(%sp)
202 cfi_adjust_cfa_offset (4)
203 move.l (32+FPSPACE)(%sp), -(%sp)
204 cfi_adjust_cfa_offset (4)
205 jbsr _dl_call_pltexit
207 cfi_adjust_cfa_offset (-16)
209 cfi_adjust_cfa_offset (-4)
211 cfi_adjust_cfa_offset (-4)
213 cfi_adjust_cfa_offset (-4)
216 cfi_adjust_cfa_offset (-FPSPACE)
219 cfi_adjust_cfa_offset (-20)
222 .size _dl_runtime_profile, . - _dl_runtime_profile