arm.h (ASM_OUTPUT_REG_PUSH, [...]): Wrap in do...while(0)
authorRichard Earnshaw <rearnsha@arm.com>
Wed, 24 Sep 2003 09:06:32 +0000 (09:06 +0000)
committerRichard Earnshaw <rearnsha@gcc.gnu.org>
Wed, 24 Sep 2003 09:06:32 +0000 (09:06 +0000)
* arm.h (ASM_OUTPUT_REG_PUSH, ASM_OUTPUT_REG_POP): Wrap in
do...while(0)

From-SVN: r71731

gcc/ChangeLog
gcc/config/arm/arm.h

index 5204532..7168de6 100644 (file)
@@ -1,3 +1,8 @@
+2003-09-24  Richard Earnshaw  <rearnsha@arm.com>
+
+       * arm.h (ASM_OUTPUT_REG_PUSH, ASM_OUTPUT_REG_POP): Wrap in
+       do...while(0)
+
 2003-09-23  Nathanael Nerode  <neroden@gcc.gnu.org>
 
        * config.gcc: Move use_fixproto=no from generic vxworks clause to
index 958cbcb..dc21b53 100644 (file)
@@ -2409,19 +2409,25 @@ extern int making_const_table;
 
 /* Output a push or a pop instruction (only used when profiling).  */
 #define ASM_OUTPUT_REG_PUSH(STREAM, REGNO)             \
-  if (TARGET_ARM)                                      \
-    asm_fprintf (STREAM,"\tstmfd\t%r!,{%r}\n",                 \
-                STACK_POINTER_REGNUM, REGNO);          \
-  else                                                 \
-    asm_fprintf (STREAM, "\tpush {%r}\n", REGNO)
+  do                                                   \
+    {                                                  \
+      if (TARGET_ARM)                                  \
+       asm_fprintf (STREAM,"\tstmfd\t%r!,{%r}\n",      \
+                    STACK_POINTER_REGNUM, REGNO);      \
+      else                                             \
+       asm_fprintf (STREAM, "\tpush {%r}\n", REGNO);   \
+    } while (0)
 
 
 #define ASM_OUTPUT_REG_POP(STREAM, REGNO)              \
-  if (TARGET_ARM)                                      \
-    asm_fprintf (STREAM, "\tldmfd\t%r!,{%r}\n",                \
-                 STACK_POINTER_REGNUM, REGNO);         \
-  else                                                 \
-    asm_fprintf (STREAM, "\tpop {%r}\n", REGNO)
+  do                                                   \
+    {                                                  \
+      if (TARGET_ARM)                                  \
+       asm_fprintf (STREAM, "\tldmfd\t%r!,{%r}\n",     \
+                    STACK_POINTER_REGNUM, REGNO);      \
+      else                                             \
+       asm_fprintf (STREAM, "\tpop {%r}\n", REGNO);    \
+    } while (0)
 
 /* This is how to output a label which precedes a jumptable.  Since
    Thumb instructions are 2 bytes, we may need explicit alignment here.  */
@@ -2431,7 +2437,7 @@ extern int making_const_table;
     {                                                          \
       if (TARGET_THUMB)                                                \
         ASM_OUTPUT_ALIGN (FILE, 2);                            \
-      (*targetm.asm_out.internal_label) (FILE, PREFIX, NUM);           \
+      (*targetm.asm_out.internal_label) (FILE, PREFIX, NUM);   \
     }                                                          \
   while (0)