1 /* PLT trampolines. m68k version.
2 Copyright (C) 2005-2023 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 <https://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
65 .globl _dl_runtime_profile
66 .type _dl_runtime_profile, @function
69 cfi_adjust_cfa_offset (8)
71 cfi_adjust_cfa_offset (4)
73 cfi_adjust_cfa_offset (4)
75 cfi_adjust_cfa_offset (4)
77 cfi_adjust_cfa_offset (4)
78 | Push parameters for _dl_profile_fixup
80 cfi_adjust_cfa_offset (4)
82 cfi_adjust_cfa_offset (4)
83 move.l 32(%sp), -(%sp)
84 cfi_adjust_cfa_offset (4)
85 move.l 32(%sp), -(%sp)
86 cfi_adjust_cfa_offset (4)
87 move.l 32(%sp), -(%sp)
88 cfi_adjust_cfa_offset (4)
90 cfi_adjust_cfa_offset (8)
91 | Call the real address resolver.
92 jbsr _dl_profile_fixup
95 cfi_adjust_cfa_offset (-28)
99 cfi_adjust_cfa_offset (-4)
100 | Restore register %a0 and %a1.
102 cfi_adjust_cfa_offset (-4)
104 cfi_adjust_cfa_offset (-4)
106 cfi_adjust_cfa_offset (-12)
107 | Call real function.
110 cfi_adjust_cfa_offset (4)
126 cfi_adjust_cfa_offset (20)
128 cfi_adjust_cfa_offset (24)
131 cfi_rel_offset (%a2, 0)
135 | Round framesize up to longword alignment
140 cfi_def_cfa_register (%a2)
144 1: move.l (%a1)+, (%a0)+
151 1: move.l (%a1)+, (%a0)+
155 %a2+24 return address
162 %sp copied stack frame
176 cfi_def_cfa_register (%sp)
178 cfi_adjust_cfa_offset (4)
190 cfi_adjust_cfa_offset (FPSPACE)
193 cfi_adjust_cfa_offset (4)
195 cfi_adjust_cfa_offset (4)
197 cfi_adjust_cfa_offset (4)
199 cfi_adjust_cfa_offset (4)
200 pea (16+FPSPACE)(%sp)
201 cfi_adjust_cfa_offset (4)
202 move.l (32+FPSPACE)(%sp), -(%sp)
203 cfi_adjust_cfa_offset (4)
204 move.l (32+FPSPACE)(%sp), -(%sp)
205 cfi_adjust_cfa_offset (4)
206 jbsr _dl_audit_pltexit
208 cfi_adjust_cfa_offset (-16)
210 cfi_adjust_cfa_offset (-4)
212 cfi_adjust_cfa_offset (-4)
214 cfi_adjust_cfa_offset (-4)
217 cfi_adjust_cfa_offset (-FPSPACE)
220 cfi_adjust_cfa_offset (-20)
223 .size _dl_runtime_profile, . - _dl_runtime_profile