newlib/libgloss/rx/gcrt0.S
Nick Clifton fd6942ab42 newlib:
* configure.host: Add support for RX architecture.
        * libc/include/machine/ieeefp.h: Likewise.
        * libc/include/machine/setjmp.h: Likewise.
        * libc/include/machine/configure.in: Likewise.
        * libc/include/machine/configure: Regenerate.
        * libc/machine/rx: New directory.
        * libc/machine/rx/*: New files to support RX architecture.

libgloss:
        * configure.in: Add support for RX sub-directory.
        * configure: Regenerate.
        * rx: New directory.
        * rx/*: New files to support RX architecture.
2009-10-26 10:05:23 +00:00

26 lines
696 B
ArmAsm

#define PROFILE_SUPPORT 1
#include "crt0.S"
.global __mcount
__mcount:
;; When a function is compiled for profiling, gcc creates code
;; like this at the start of each profiled function:
;;
;; .global <func_name>
;; <func_name>:
;; bsr __mcount
;; <...function's prologue...>
;; <...function's body...>
;;
;; We must save all of the argument registers, extract the
;; address of <func_name>, call _mcount_internal to do the
;; real work and then restore the argument registers before
;; returning.
pushm r1-r4
mov.l 16[r0], r1
bsr __mcount_internal
rtsd #16, r1-r4