2 // Copyright (c) 2012 Xilinx, Inc. All rights reserved.
5 // XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS" AS A
6 // COURTESY TO YOU. BY PROVIDING THIS DESIGN, CODE, OR INFORMATION AS
7 // ONE POSSIBLE IMPLEMENTATION OF THIS FEATURE, APPLICATION OR
8 // STANDARD, XILINX IS MAKING NO REPRESENTATION THAT THIS IMPLEMENTATION
9 // IS FREE FROM ANY CLAIMS OF INFRINGEMENT, AND YOU ARE RESPONSIBLE
10 // FOR OBTAINING ANY RIGHTS YOU MAY REQUIRE FOR YOUR IMPLEMENTATION.
11 // XILINX EXPRESSLY DISCLAIMS ANY WARRANTY WHATSOEVER WITH RESPECT TO
12 // THE ADEQUACY OF THE IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO
13 // ANY WARRANTIES OR REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE
14 // FROM CLAIMS OF INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY
15 // AND FITNESS FOR A PARTICULAR PURPOSE.
17 // $Id: profile_mcount_arm.S,v 1.1.2.1 2011/05/17 04:37:57 sadanan Exp $
20 // based on "ARM Profiling Implementation" from Sourcery G++ Lite for ARM EABI
22 .globl __gnu_mcount_nc
23 .type __gnu_mcount_nc, %function
26 push {r0, r1, r2, r3, lr}
27 subs r1, lr, #0 /* callee - current lr */
28 ldr r0, [sp, #20] /* caller - at the top of the stack */
29 bl mcount /* when __gnu_mcount_nc is called */
30 pop {r0, r1, r2, r3, ip, lr}