summaryrefslogtreecommitdiff
path: root/firmware/target/coldfire
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2007-03-25 20:45:08 +0000
committerMichael Sevakis <jethead71@rockbox.org>2007-03-25 20:45:08 +0000
commit8f04faef91e759aa97d85f403ba236278a25d9f6 (patch)
tree6677c9302ee03016136238a14d52fb3cae73776e /firmware/target/coldfire
parent465820da22e9948a85a227d1e3d8dc42a705c6a9 (diff)
Save a couple bytes in set_irq_level on Coldfire. Should add up to something.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12912 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/coldfire')
-rw-r--r--firmware/target/coldfire/system-target.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/firmware/target/coldfire/system-target.h b/firmware/target/coldfire/system-target.h
index 97d096f0e8..c707843af5 100644
--- a/firmware/target/coldfire/system-target.h
+++ b/firmware/target/coldfire/system-target.h
@@ -71,9 +71,10 @@ static inline int set_irq_level(int level)
{
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" : "=d" (oldlevel), "+d" (level) : );
+ asm volatile ("move.w %%sr, %0 \n"
+ "bset.l #13, %1 \n" /* Keep supervisor state set */
+ "move.w %1, %%sr \n"
+ : "=d"(oldlevel), "+d"(level));
return oldlevel;
}