mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-15 02:57:37 -04:00
Fix profiling on coldfire with newer Gcc.
In switch_thread, make the call to profile_thread_stopped from an inline asm block to make sure the sp is pointing to the right place before storing the context. This apparently worked by luck with the old Gcc. The workaround used for coldfire in the codeclib's __cyg_profile_func_enter does not work with newer gcc, however the workaround isn't needed for those so enable it only for coldfire gcc version < 4. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28908 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
bf897793d7
commit
479414facc
2 changed files with 14 additions and 1 deletions
|
@ -163,7 +163,9 @@ const uint8_t bs_clz_tab[256] ICONST_ATTR = {
|
|||
|
||||
#ifdef RB_PROFILE
|
||||
void __cyg_profile_func_enter(void *this_fn, void *call_site) {
|
||||
#ifdef CPU_COLDFIRE
|
||||
/* This workaround is required for coldfire gcc 3.4 but is broken for 4.4
|
||||
and 4.5, but for those the other way works. */
|
||||
#if defined(CPU_COLDFIRE) && defined(__GNUC__) && __GNUC__ < 4
|
||||
(void)call_site;
|
||||
ci->profile_func_enter(this_fn, __builtin_return_address(1));
|
||||
#else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue