~ubuntu-branches/ubuntu/trusty/eglibc/trusty

« back to all changes in this revision

Viewing changes to .pc/svn-updates.diff/sysdeps/powerpc/powerpc32/ppc-mcount.S

  • Committer: Package Import Robot
  • Author(s): Adam Conrad
  • Date: 2013-01-10 18:39:35 UTC
  • mfrom: (1.5.2) (4.4.24 experimental)
  • Revision ID: package-import@ubuntu.com-20130110183935-afsgfxkmg7wk5eaj
Tags: 2.17-0ubuntu1
* Merge with Debian, bringing in a new upstream and many small fixes:
  - patches/any/cvs-malloc-deadlock.diff: Dropped, merged upstream.
  - patches/ubuntu/lddebug-scopes.diff: Rebase for upstream changes.
  - patches/ubuntu/local-CVE-2012-3406.diff: Rebased against upstream.
  - patches/ubuntu/no-asm-mtune-i686.diff: Fixed in recent binutils.
* This upstream merge fixes a nasty hang in pulseaudio (LP: #1085342)
* Bump MIN_KERNEL_SUPPORTED to 2.6.32 on ARM, now that we no longer
  have to support shonky 2.6.31 kernels on imx51 babbage builders.
* Drop patches/ubuntu/local-disable-nscd-host-caching.diff, as these
  issues were apparently resolved upstream a while ago (LP: #613662)
* Fix the compiled-in bug URL to point to launchpad.net, not Debian.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* PowerPC-specific implementation of profiling support.
2
 
   Copyright (C) 1997, 1999, 2005, 2006 Free Software Foundation, Inc.
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
16
 
   License along with the GNU C Library; if not, see
17
 
   <http://www.gnu.org/licenses/>.  */
18
 
 
19
 
/* This would be bad.  */
20
 
#ifdef PROF
21
 
#undef PROF
22
 
#endif
23
 
 
24
 
#include <sysdep.h>
25
 
 
26
 
/* We do profiling as described in the SYSV ELF ABI, except that glibc
27
 
   _mcount manages its own counters.  The caller has put the address the
28
 
   caller will return to in the usual place on the stack, 4(r1).  _mcount
29
 
   is responsible for ensuring that when it returns no argument-passing
30
 
   registers are disturbed, and that the LR is set back to (what the
31
 
   caller sees as) 4(r1).
32
 
 
33
 
   This is intended so that the following code can be inserted at the
34
 
   front of any routine without changing the routine:
35
 
 
36
 
        .data
37
 
        mflr    r0
38
 
        stw     r0,4(r1)
39
 
        bl      _mcount
40
 
*/
41
 
 
42
 
ENTRY(_mcount)
43
 
        stwu    r1,-48(r1)
44
 
        cfi_adjust_cfa_offset (48)
45
 
/* We need to save the parameter-passing registers.  */
46
 
        stw     r3, 12(r1)
47
 
        stw     r4, 16(r1)
48
 
        stw     r5, 20(r1)
49
 
        stw     r6, 24(r1)
50
 
        mflr    r4
51
 
        lwz     r3, 52(r1)
52
 
        mfcr    r5
53
 
        stw     r7, 28(r1)
54
 
        stw     r8, 32(r1)
55
 
        stw     r9, 36(r1)
56
 
        stw     r10,40(r1)
57
 
        stw     r4, 44(r1)
58
 
        cfi_offset (lr, -4)
59
 
        stw     r5,  8(r1)
60
 
        bl      JUMPTARGET(__mcount_internal)
61
 
 /* Restore the registers...  */
62
 
        lwz     r6,  8(r1)
63
 
        lwz     r0, 44(r1)
64
 
        lwz     r3, 12(r1)
65
 
        mtctr   r0
66
 
        lwz     r4, 16(r1)
67
 
        mtcrf   0xff,r6
68
 
        lwz     r5, 20(r1)
69
 
        lwz     r6, 24(r1)
70
 
        lwz     r0, 52(r1)
71
 
        lwz     r7, 28(r1)
72
 
        lwz     r8, 32(r1)
73
 
        mtlr    r0
74
 
        lwz     r9, 36(r1)
75
 
        lwz     r10,40(r1)
76
 
 /* ...unwind the stack frame, and return to your usual programming.  */
77
 
        addi    r1,r1,48
78
 
        bctr
79
 
END(_mcount)