OSDN Git Service

Add clobber
authorYoshinori Sato <ysato@users.sourceforge.jp>
Wed, 31 Dec 2014 09:46:30 +0000 (18:46 +0900)
committerYoshinori Sato <ysato@users.sourceforge.jp>
Wed, 31 Dec 2014 09:46:30 +0000 (18:46 +0900)
arch/h8300/include/asm/irqflags.h

index 938982e..98206a4 100644 (file)
@@ -2,7 +2,7 @@
 #define _H8300_IRQFLAGS_H
 
 #ifdef CONFIG_CPU_H8300H
-static inline unsigned long arch_local_save_flags(void)
+static inline unsigned char arch_local_save_flags(void)
 {
        unsigned char flags;
        asm volatile ("stc ccr,%w0" : "=r" (flags));
@@ -11,25 +11,25 @@ static inline unsigned long arch_local_save_flags(void)
 
 static inline void arch_local_irq_disable(void)
 {
-       asm volatile ("orc  #0xc0,ccr" : : : "memory");
+       asm volatile ("orc  #0xc0,ccr" : : : "cc", "memory");
 }
 
 static inline void arch_local_irq_enable(void)
 {
-       asm volatile ("andc #0x3f,ccr" : : : "memory");
+       asm volatile ("andc #0x3f,ccr" : : : "cc", "memory");
 }
 
 static inline unsigned char arch_local_irq_save(void)
 {
        unsigned char flags;
-       asm volatile ("stc ccr,%w0\n\t" \
-                     "orc  #0xc0,ccr" :"=r" (flags) : : "memory");
+       asm volatile ("stc ccr,%w0\n\t"
+                     "orc  #0xc0,ccr" :"=r" (flags) : : "cc", "memory");
        return flags;
 }
 
 static inline void arch_local_irq_restore(unsigned char flags)
 {
-       asm volatile ("ldc %w0,ccr" : : "r" (flags) : "memory");
+       asm volatile ("ldc %w0,ccr" : : "r" (flags) : "cc","memory");
 }
 
 static inline int arch_irqs_disabled_flags(unsigned long flags)
@@ -47,25 +47,32 @@ static inline unsigned long arch_local_save_flags(void)
 
 static inline void arch_local_irq_disable(void)
 {
-       asm volatile ("orc  #0x80,ccr\n\torc #0x07,exr" : : : "memory");
+       asm volatile ("orc  #0x80,ccr\n\t"
+                     "orc #0x07,exr" : : : "cc", "memory");
 }
 
 static inline void arch_local_irq_enable(void)
 {
-       asm volatile ("andc #0x7f,ccr\n\tandc #0xf0,exr\n\t": : : "memory");
+       asm volatile ("andc #0x7f,ccr\n\t"
+                     "andc #0xf0,exr\n\t": : : "cc", "memory");
 }
 
 static inline unsigned long arch_local_irq_save(void)
 {
        unsigned short flags;
-       asm volatile ("stc ccr,%w0\n\tstc exr,%x0\n\t"
-                     "orc  #0x80,ccr\n\torc #0x07,exr" :"=r" (flags) : : "memory");
+       asm volatile ("stc ccr,%w0\n\t"
+                     "stc exr,%x0\n\t"
+                     "orc  #0x80,ccr\n\t"
+                     "orc #0x07,exr"
+                     : "=r" (flags) : : "cc", "memory");
        return flags;
 }
 
 static inline void arch_local_irq_restore(unsigned long flags)
 {
-       asm volatile ("ldc %w0,ccr\n\tldc %x0,exr" : : "r" (flags) : "memory");
+       asm volatile ("ldc %w0,ccr\n\t"
+                     "ldc %x0,exr"
+                     : : "r" (flags) : "cc", "memory");
 }
 
 static inline int arch_irqs_disabled_flags(unsigned short flags)