summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2004-10-27 06:49:15 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2004-10-27 06:49:15 +0000
commitabeb582a9cb347bcf14b265ad1fa5ff5caa5ed6b (patch)
tree27fe4a89450fee6ede5cf485be27f639b10d961e
parentbf41fcee8b46fe0c3f52c7d6431ea1effc0c3a5e (diff)
Coldfire: set_irq_level() mixed up the in/out registers
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5363 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/export/system.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/firmware/export/system.h b/firmware/export/system.h
index 7ac5c1d1d5..1205e9360b 100644
--- a/firmware/export/system.h
+++ b/firmware/export/system.h
@@ -147,12 +147,12 @@ enum {
#define HIGHEST_IRQ_LEVEL (7<<8)
static inline int set_irq_level(int level)
{
- int i;
+ int oldlevel;
/* Read the old level and set the new one */
asm volatile ("move.w %%sr,%0\n"
"or.l #0x2000,%1\n"
- "move.w %1,%%sr\n" : "=r" (i) : "r" (level));
- return i;
+ "move.w %1,%%sr\n" : "=r" (oldlevel), "+r" (level) : );
+ return oldlevel;
}
#endif