]>
Commit | Line | Data |
---|---|---|
cfc91acd | 1 | /* PowerPC64-specific implementation of profiling support. |
04277e02 | 2 | Copyright (C) 1997-2019 Free Software Foundation, Inc. |
cfc91acd RM |
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 | |
7 | License as published by the Free Software Foundation; either | |
8 | version 2.1 of the 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 | |
59ba27a6 | 16 | License along with the GNU C Library; if not, see |
5cb226d7 | 17 | <https://www.gnu.org/licenses/>. */ |
cfc91acd | 18 | |
cfc91acd RM |
19 | #include <sysdep.h> |
20 | /* We don't need to save the parameter-passing registers as gcc takes | |
21 | care of that for us. Thus this function looks fairly normal. | |
22 | In fact, the generic code would work for us. */ | |
23 | ||
24 | ENTRY(_mcount) | |
25 | mflr r4 | |
26 | ld r11, 0(r1) | |
d5b41185 | 27 | std r4, FRAME_LR_SAVE(r1) |
8b8a692c UW |
28 | stdu r1,-FRAME_MIN_SIZE(r1) |
29 | cfi_adjust_cfa_offset (FRAME_MIN_SIZE) | |
8b8a692c UW |
30 | cfi_offset (lr, FRAME_LR_SAVE) |
31 | ld r3, FRAME_LR_SAVE(r11) | |
cfc91acd | 32 | bl JUMPTARGET(__mcount_internal) |
d5b41185 | 33 | #ifndef SHARED |
cfc91acd | 34 | nop |
d5b41185 | 35 | #endif |
8b8a692c | 36 | ld r0, FRAME_MIN_SIZE+FRAME_LR_SAVE(r1) |
cfc91acd | 37 | mtlr r0 |
8b8a692c | 38 | addi r1,r1,FRAME_MIN_SIZE |
cfc91acd RM |
39 | blr |
40 | END(_mcount) |