forked from len0rd/rockbox
Made set_irq_level() an inline function, and optimized it by removing the bit shifts
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4330 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
aa5b23d616
commit
111a972b65
8 changed files with 25 additions and 22 deletions
|
@ -318,18 +318,6 @@ void system_reboot (void)
|
|||
"r"(*(int*)0),"r"(4));
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Interrupt level setting
|
||||
****************************************************************************/
|
||||
int set_irq_level(int level)
|
||||
{
|
||||
int i;
|
||||
/* Read the old level and set the new one */
|
||||
asm volatile ("stc sr, %0" : "=r" (i));
|
||||
asm volatile ("ldc %0, sr" : : "r" (level << 4));
|
||||
return (i >> 4) & 0x0f;
|
||||
}
|
||||
|
||||
void UIE (unsigned int pc) /* Unexpected Interrupt or Exception */
|
||||
{
|
||||
bool state = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue