aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg-Johann Lay <avr@gjlay.de>2012-05-23 15:25:22 +0000
committerGeorg-Johann Lay <gjl@gcc.gnu.org>2012-05-23 15:25:22 +0000
commitb49eb0fff1839aaaf4d552e1081271d98ca5db64 (patch)
treeef634817efc7527c2f456cb2d5a0880f57ee79c2
parent0a9696f0225d1ab4a8d3a992c9e98f68e9996876 (diff)
downloadgcc-b49eb0fff1839aaaf4d552e1081271d98ca5db64.zip
gcc-b49eb0fff1839aaaf4d552e1081271d98ca5db64.tar.gz
gcc-b49eb0fff1839aaaf4d552e1081271d98ca5db64.tar.bz2
re PR target/53448 ([avr] ignoring __attribute__((aligned(2))))
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
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/avr/avr.h8
-rw-r--r--gcc/config/avr/elf.h2
3 files changed, 12 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 112f318..82d084d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/config/avr/avr.h b/gcc/config/avr/avr.h
index dfbd071..17867eb 100644
--- a/gcc/config/avr/avr.h
+++ b/gcc/config/avr/avr.h
@@ -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
diff --git a/gcc/config/avr/elf.h b/gcc/config/avr/elf.h
index 6d79dc3..82a0969 100644
--- a/gcc/config/avr/elf.h
+++ b/gcc/config/avr/elf.h
@@ -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