]>
Commit | Line | Data |
---|---|---|
f1717362 | 1 | /* Copyright (C) 2000-2016 Free Software Foundation, Inc. |
0abf894c | 2 | This file was adapted from glibc sources. |
3 | ||
187b36cf | 4 | This file is part of GCC. |
0abf894c | 5 | |
187b36cf | 6 | GCC is free software; you can redistribute it and/or modify it |
0abf894c | 7 | under the terms of the GNU General Public License as published by the |
6bc9506f | 8 | Free Software Foundation; either version 3, or (at your option) any |
0abf894c | 9 | later version. |
10 | ||
187b36cf | 11 | GCC is distributed in the hope that it will be useful, |
0abf894c | 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
14 | General Public License for more details. | |
15 | ||
6bc9506f | 16 | Under Section 7 of GPL version 3, you are granted additional |
17 | permissions described in the GCC Runtime Library Exception, version | |
18 | 3.1, as published by the Free Software Foundation. | |
19 | ||
20 | You should have received a copy of the GNU General Public License and | |
21 | a copy of the GCC Runtime Library Exception along with this program; | |
22 | see the files COPYING3 and COPYING.RUNTIME respectively. If not, see | |
23 | <http://www.gnu.org/licenses/>. */ | |
0abf894c | 24 | |
237490bf | 25 | /* See an explanation about .init and .fini in crti.S. */ |
0abf894c | 26 | |
27 | .section .init | |
87e19636 | 28 | #if __SHMEDIA__ |
29 | add r14, r63, r15 | |
30 | ld.q r15, 0, r18 | |
31 | ptabs r18, tr0 | |
32 | ld.q r15, 8, r14 | |
33 | addi r15, 16, r15 | |
34 | blink tr0, r63 | |
35 | #elif __SH5__ && ! __SHMEDIA__ | |
36 | mov r14,r15 | |
37 | lds.l @r14+,pr | |
38 | mov.l @r14,r14 | |
39 | rts | |
40 | add #8,r15 | |
41 | #else | |
c8240191 | 42 | mov r14,r15 |
0abf894c | 43 | lds.l @r15+,pr |
44 | mov.l @r15+,r14 | |
45 | rts | |
46 | #ifdef __ELF__ | |
47 | mov.l @r15+,r12 | |
48 | #else | |
49 | nop | |
50 | #endif | |
87e19636 | 51 | #endif /* __SHMEDIA__ */ |
0abf894c | 52 | |
53 | .section .fini | |
87e19636 | 54 | #if __SHMEDIA__ |
55 | add r14, r63, r15 | |
56 | ld.q r15, 0, r18 | |
57 | ptabs r18, tr0 | |
58 | ld.q r15, 8, r14 | |
59 | addi r15, 16, r15 | |
60 | blink tr0, r63 | |
61 | #elif __SH5__ && ! __SHMEDIA__ | |
62 | mov r14,r15 | |
63 | lds.l @r14+,pr | |
64 | mov.l @r14,r14 | |
65 | rts | |
66 | add #8,r15 | |
67 | #else | |
c8240191 | 68 | mov r14,r15 |
0abf894c | 69 | lds.l @r15+,pr |
70 | mov.l @r15+,r14 | |
71 | rts | |
72 | #ifdef __ELF__ | |
73 | mov.l @r15+,r12 | |
74 | #else | |
75 | nop | |
76 | #endif | |
87e19636 | 77 | #endif /* __SHMEDIA__ */ |