From d2961e1bd3def26dc0bb0b38b493af69e4b1ceca Mon Sep 17 00:00:00 2001 From: arighi Date: Thu, 13 May 2010 13:59:10 +0000 Subject: [PATCH] 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 --- bertos/cpu/irq.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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" \ -- 2.25.1