diff options
author | Richard Earnshaw <rearnsha@arm.com> | 2003-09-24 09:06:32 +0000 |
---|---|---|
committer | Richard Earnshaw <rearnsha@gcc.gnu.org> | 2003-09-24 09:06:32 +0000 |
commit | 8a81cc45254902f34a892dd6e0e63f11f45844cf (patch) | |
tree | 17b14cb5b2183aab70eaa409c159bb8af33655c7 /gcc | |
parent | 859a68dce63b1dc4c1afbd97d83689e022d78297 (diff) | |
download | gcc-8a81cc45254902f34a892dd6e0e63f11f45844cf.zip gcc-8a81cc45254902f34a892dd6e0e63f11f45844cf.tar.gz gcc-8a81cc45254902f34a892dd6e0e63f11f45844cf.tar.bz2 |
arm.h (ASM_OUTPUT_REG_PUSH, [...]): Wrap in do...while(0)
* arm.h (ASM_OUTPUT_REG_PUSH, ASM_OUTPUT_REG_POP): Wrap in
do...while(0)
From-SVN: r71731
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/arm/arm.h | 28 |
2 files changed, 22 insertions, 11 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5204532..7168de6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h index 958cbcb..dc21b53 100644 --- a/gcc/config/arm/arm.h +++ b/gcc/config/arm/arm.h @@ -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) |