re PR target/53448 ([avr] ignoring __attribute__((aligned(2))))
authorGeorg-Johann Lay <avr@gjlay.de>
Wed, 23 May 2012 15:25:22 +0000 (15:25 +0000)
committerGeorg-Johann Lay <gjl@gcc.gnu.org>
Wed, 23 May 2012 15:25:22 +0000 (15:25 +0000)
PR target/53448
* config/avr/avr.h (ASM_OUTPUT_ALIGN): Don't inhibit .p2align 1.
* config/avr/elf.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Use
ASM_OUTPUT_ALIGN.

From-SVN: r187803

gcc/ChangeLog
gcc/config/avr/avr.h
gcc/config/avr/elf.h

index 112f31873cc44c50c111ad166e1f2598dcd171d3..82d084dfc964032a139ba0f1f3bf1133626f3c4c 100644 (file)
@@ -1,3 +1,10 @@
+2012-05-23  Georg-Johann Lay  <avr@gjlay.de>
+
+       PR target/53448
+       * config/avr/avr.h (ASM_OUTPUT_ALIGN): Don't inhibit .p2align 1.
+       * config/avr/elf.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Use
+       ASM_OUTPUT_ALIGN.
+
 2012-05-23  Richard Guenther  <rguenther@suse.de>
 
        * tree-dfa.c (add_referenced_var_1): Do not add global vars.
index dfbd071d192a2d61ffade37bb111de345516756e..17867eb342e8361c7b57d9d6910697623d66a25f 100644 (file)
@@ -557,10 +557,10 @@ typedef struct avr_args {
 #define ASM_OUTPUT_ADDR_VEC_ELT(STREAM, VALUE)         \
   avr_output_addr_vec_elt(STREAM, VALUE)
 
-#define ASM_OUTPUT_ALIGN(STREAM, POWER)                        \
-  do {                                                 \
-      if ((POWER) > 1)                                 \
-          fprintf (STREAM, "\t.p2align\t%d\n", POWER); \
+#define ASM_OUTPUT_ALIGN(STREAM, POWER)                 \
+  do {                                                  \
+    if ((POWER) > 0)                                    \
+      fprintf (STREAM, "\t.p2align\t%d\n", POWER);      \
   } while (0)
 
 #define CASE_VECTOR_MODE HImode
index 6d79dc38cb81475cbcb942a36bec850524586459..82a0969d3b050ca810565804aa120534bfdb1517 100644 (file)
@@ -35,7 +35,7 @@
 /* Output alignment 2**1 for jump tables.  */
 #undef ASM_OUTPUT_BEFORE_CASE_LABEL
 #define ASM_OUTPUT_BEFORE_CASE_LABEL(FILE, PREFIX, NUM, TABLE) \
-  fprintf (FILE, "\t.p2align\t1\n");
+  ASM_OUTPUT_ALIGN (FILE, 1);
 
 /* Be conservative in crtstuff.c.  */
 #undef INIT_SECTION_ASM_OP