[BZ #341] (O_NOATIME): Define.
[glibc.git] / sysdeps / powerpc / powerpc64 / ppc-mcount.S
blobeaa586a0d85c2c6b090b69c62c7661643b2acb86
1 /* PowerPC64-specific implementation of profiling support.
2    Copyright (C) 1997, 1999, 2002 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, write to the Free
17    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
18    02111-1307 USA.  */
20 /* This would be bad.  */
21 #ifdef PROF
22 #undef PROF
23 #endif
25 #include <sysdep.h>
26 /* We don't need to save the parameter-passing registers as gcc takes
27    care of that for us.  Thus this function looks fairly normal.
28    In fact, the generic code would work for us.  */
30 ENTRY(_mcount)
31         mflr             r4
32         ld               r11, 0(r1)
33         stdu             r1,-112(r1)
34         std              r4, 128(r1)
35         ld               r3, 16(r11)
36         bl               JUMPTARGET(__mcount_internal)
37         nop
38         ld               r0, 128(r1)
39         mtlr             r0
40         addi             r1,r1,112
41         blr
42 END(_mcount)