mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
panicf doesn't return so why not tell GCC and $AVE :
Change-Id: I6096576f539bfb02b340b82fabc5019f6756b722
This commit is contained in:
parent
6ffb8ffeee
commit
2cb274ca77
3 changed files with 4 additions and 7 deletions
|
@ -44,12 +44,13 @@ static char panic_buf[128];
|
|||
void panicf_f( const char *fmt, ...);
|
||||
|
||||
/* we wrap panicf() here with naked function to catch SP value */
|
||||
void panicf( const char *fmt, ...)
|
||||
void __attribute__((naked)) panicf( const char *fmt, ...)
|
||||
{
|
||||
(void)fmt;
|
||||
asm volatile ("mov r4, sp \n"
|
||||
"b panicf_f \n"
|
||||
);
|
||||
while (1);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue