URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 207 |
Rev 345 |
#define PROFILE_SUPPORT 1
|
#define PROFILE_SUPPORT 1
|
|
|
#include "crt0.S"
|
#include "crt0.S"
|
|
|
.global __mcount
|
.global __mcount
|
__mcount:
|
__mcount:
|
;; When a function is compiled for profiling, gcc creates code
|
;; When a function is compiled for profiling, gcc creates code
|
;; like this at the start of each profiled function:
|
;; like this at the start of each profiled function:
|
;;
|
;;
|
;; .global
|
;; .global
|
;; :
|
;; :
|
;; bsr __mcount
|
;; bsr __mcount
|
;; <...function's prologue...>
|
;; <...function's prologue...>
|
;; <...function's body...>
|
;; <...function's body...>
|
;;
|
;;
|
;; We must save all of the argument registers, extract the
|
;; We must save all of the argument registers, extract the
|
;; address of , call _mcount_internal to do the
|
;; address of , call _mcount_internal to do the
|
;; real work and then restore the argument registers before
|
;; real work and then restore the argument registers before
|
;; returning.
|
;; returning.
|
|
|
pushm r1-r4
|
pushm r1-r4
|
mov.l 16[r0], r1
|
mov.l 16[r0], r1
|
bsr __mcount_internal
|
bsr __mcount_internal
|
rtsd #16, r1-r4
|
rtsd #16, r1-r4
|
|
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.