1/* Copyright (C) 2005-2022 Free Software Foundation, Inc.
2
3 This file is part of the GNU C Library.
4
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 License as
7 published by the Free Software Foundation; either version 2.1 of the
8 License, or (at your option) any later version.
9
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.
14
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/>. */
18
19#include <sysdep.h>
20#include <libc-symbols.h>
21
22#ifndef PROF
23
24 .text
25 .globl _dl_runtime_resolve
26 .type _dl_runtime_resolve, @function
27 .align 4
28_dl_runtime_resolve:
29 addik r1,r1,-40
30 swi r5,r1,12
31 swi r6,r1,16
32 swi r7,r1,20
33 swi r8,r1,24
34 swi r9,r1,28
35 swi r10,r1,32
36 swi r15,r1,0
37 addk r5,r0,r4
38 brlid r15, _dl_fixup
39 addk r6,r0,r3; /* delay slot. */
40 lwi r10,r1,32
41 lwi r9,r1,28
42 lwi r8,r1,24
43 lwi r7,r1,20
44 lwi r6,r1,16
45 lwi r5,r1,12
46 lwi r15,r1,0
47 brad r3
48 addik r1,r1,40; /* delay slot. */
49 .size _dl_runtime_resolve, . - _dl_runtime_resolve
50
51 .text
52 .globl _dl_runtime_profile
53 .type _dl_runtime_profile, @function
54 .align 4
55_dl_runtime_profile:
56 addik r1,r1,-40
57 swi r5,r1,12
58 swi r6,r1,16
59 swi r7,r1,20
60 swi r8,r1,24
61 swi r9,r1,28
62 swi r10,r1,32
63 swi r15,r1,0
64 addk r5,r0,r4
65 brlid r15, _dl_profile_fixup
66 addk r6,r0,r3; /* delay slot. */
67 lwi r10,r1,32
68 lwi r9,r1,28
69 lwi r8,r1,24
70 lwi r7,r1,20
71 lwi r6,r1,16
72 lwi r5,r1,12
73 lwi r15,r1,0
74 brad r3
75 addik r1,r1,40; /* delay slot. */
76 .size _dl_runtime_profile, . - _dl_runtime_profile
77
78#else
79
80 .text
81 .globl _dl_runtime_resolve
82 .type _dl_runtime_resolve, @function
83 .align 4
84_dl_runtime_resolve:
85 addik r1,r1,-40
86 swi r5,r1,12
87 swi r6,r1,16
88 swi r7,r1,20
89 swi r8,r1,24
90 swi r9,r1,28
91 swi r10,r1,32
92 swi r15,r1,0
93 addk r5,r0,r4
94 brlid r15, fixup
95 addk r6,r0,r3; /* delay slot. */
96 lwi r10,r1,32
97 lwi r9,r1,28
98 lwi r8,r1,24
99 lwi r7,r1,20
100 lwi r6,r1,16
101 lwi r5,r1,12
102 lwi r15,r1,0
103 brad r3
104 addik r1,r1,40; /* delay slot. */
105 .size _dl_runtime_resolve, . - _dl_runtime_resolve
106 .globl _dl_runtime_profile
107 .set _dl_runtime_profile, _dl_runtime_resolve
108
109#endif
110

source code of glibc/sysdeps/microblaze/dl-trampoline.S