From: arighi Date: Thu, 13 May 2010 13:59:10 +0000 (+0000) Subject: ARM7TDMI: simplify IRQ_SAVE_DISABLE(). X-Git-Tag: 2.5.0~237 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=d2961e1bd3def26dc0bb0b38b493af69e4b1ceca;p=bertos.git ARM7TDMI: simplify IRQ_SAVE_DISABLE(). The temporary register moved to cpsr (to disable interrupts) can be simply declared using a "register" variable. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3680 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/cpu/irq.h b/bertos/cpu/irq.h index 60acce21..f4cd21ee 100644 --- a/bertos/cpu/irq.h +++ b/bertos/cpu/irq.h @@ -261,8 +261,7 @@ #define IRQ_SAVE_DISABLE(x) \ do { \ - cpu_flags_t sreg; \ - (void) (&sreg == &x); \ + register cpu_flags_t sreg; \ asm volatile ( \ "mrs %0, cpsr\n\t" \ "orr %1, %0, #0xc0\n\t" \