OSDN Git Service

PR target/44805
authordanglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 17 Jul 2010 22:51:34 +0000 (22:51 +0000)
committerdanglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 17 Jul 2010 22:51:34 +0000 (22:51 +0000)
* config/pa/pa.h (CONSTANT_ALIGNMENT): Align strings to BITS_PER_WORD
on all targets.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162278 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/pa/pa.h

index 77938c3..ddfdc91 100644 (file)
@@ -1,3 +1,25 @@
+2010-07-17  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
+
+       PR target/44805
+       * config/pa/pa.h (CONSTANT_ALIGNMENT): Align strings to BITS_PER_WORD
+       on all targets.
+
+Index: config/pa/pa.h
+===================================================================
+--- config/pa/pa.h     (revision 162277)
++++ config/pa/pa.h     (working copy)
+@@ -316,8 +316,9 @@
+ #define BIGGEST_ALIGNMENT (2 * BITS_PER_WORD)
+ /* Get around hp-ux assembler bug, and make strcpy of constants fast.  */
+-#define CONSTANT_ALIGNMENT(CODE, TYPEALIGN) \
+-  ((TYPEALIGN) < 32 ? 32 : (TYPEALIGN))
++#define CONSTANT_ALIGNMENT(EXP, ALIGN)                \
++  (TREE_CODE (EXP) == STRING_CST              \
++   && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN))
+ /* Make arrays of chars word-aligned for the same reasons.  */
+ #define DATA_ALIGNMENT(TYPE, ALIGN)           \
 2010-07-17  Bernd Schmidt  <bernds@codesourcery.com>
 
        PR target/42235
index 1bb0f10..73116c5 100644 (file)
@@ -316,8 +316,9 @@ typedef struct GTY(()) machine_function
 #define BIGGEST_ALIGNMENT (2 * BITS_PER_WORD)
 
 /* Get around hp-ux assembler bug, and make strcpy of constants fast.  */
-#define CONSTANT_ALIGNMENT(CODE, TYPEALIGN) \
-  ((TYPEALIGN) < 32 ? 32 : (TYPEALIGN))
+#define CONSTANT_ALIGNMENT(EXP, ALIGN)         \
+  (TREE_CODE (EXP) == STRING_CST               \
+   && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN))
 
 /* Make arrays of chars word-aligned for the same reasons.  */
 #define DATA_ALIGNMENT(TYPE, ALIGN)            \