diff options
| author | Brandon Low <lostlogic@rockbox.org> | 2006-03-09 01:37:52 +0000 |
|---|---|---|
| committer | Brandon Low <lostlogic@rockbox.org> | 2006-03-09 01:37:52 +0000 |
| commit | 9c2b203025976fceb3840c2785c96f1baa261982 (patch) | |
| tree | 6ea28de2148888f3c987679f7ef57dcd13f90657 | |
| parent | ca9e8b6cf5d1bdadf0040eb2f4baec1cbd5e3d7a (diff) | |
| download | rockbox-9c2b203025976fceb3840c2785c96f1baa261982.zip rockbox-9c2b203025976fceb3840c2785c96f1baa261982.tar.gz rockbox-9c2b203025976fceb3840c2785c96f1baa261982.tar.bz2 rockbox-9c2b203025976fceb3840c2785c96f1baa261982.tar.xz | |
Fix profiling compilation for non-m68k targets
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8967 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | apps/codecs/lib/codeclib.c | 4 | ||||
| -rw-r--r-- | apps/plugins/lib/profile_plugin.c | 4 | ||||
| -rw-r--r-- | firmware/profile.c | 5 |
3 files changed, 12 insertions, 1 deletions
diff --git a/apps/codecs/lib/codeclib.c b/apps/codecs/lib/codeclib.c index e6780c6..e76d03f 100644 --- a/apps/codecs/lib/codeclib.c +++ b/apps/codecs/lib/codeclib.c @@ -145,8 +145,12 @@ void qsort(void *base, size_t nmemb, size_t size, #ifdef RB_PROFILE void __cyg_profile_func_enter(void *this_fn, void *call_site) { +#ifdef CPU_COLDFIRE (void)call_site; local_rb->profile_func_enter(this_fn, __builtin_return_address(1)); +#else + local_rb->profile_func_enter(this_fn, call_site); +#endif } void __cyg_profile_func_exit(void *this_fn, void *call_site) { diff --git a/apps/plugins/lib/profile_plugin.c b/apps/plugins/lib/profile_plugin.c index 3318476..38c6d81 100644 --- a/apps/plugins/lib/profile_plugin.c +++ b/apps/plugins/lib/profile_plugin.c @@ -29,8 +29,12 @@ void profile_init(struct plugin_api* pa) } void __cyg_profile_func_enter(void *this_fn, void *call_site) { +#ifdef CPU_COLDFIRE (void)call_site; local_rb->profile_func_enter(this_fn, __builtin_return_address(1)); +#else + local_rb->profile_func_enter(this_fn, call_site); +#endif } void __cyg_profile_func_exit(void *this_fn, void *call_site) { diff --git a/firmware/profile.c b/firmware/profile.c index 8ad4651..f6cffa7 100644 --- a/firmware/profile.c +++ b/firmware/profile.c @@ -76,10 +76,14 @@ static void profile_timer_unregister(void); static void write_function_recursive(int fd, struct pfd_struct *pfd, int depth); /* Be careful to use the right one for the size of your variable */ +#ifdef CPU_COLDFIRE #define ADDQI_L(_var,_value) \ asm ("addq.l %[value],%[var];" \ : [var] "+g" (_var) \ : [value] "I" (_value) ) +#else +#define ADDQI_L(var, value) var += value +#endif void profile_thread_stopped(int current_thread) { if (current_thread == profiling_thread) { @@ -227,7 +231,6 @@ void profile_func_enter(void *self_pc, void *from_pc) { if (profiling) { return; } - /* this is equivalent to 'profiling = PROF_BUSY;' but it's faster */ profiling = PROF_BUSY; /* A check that the PC is in the code range here wouldn't hurt, but this is * logically guaranteed to be a valid address unless the constants are |