aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contrib/gcc/config/i386/i386.c4
-rw-r--r--contrib/gcc/config/i386/i386.h7
2 files changed, 9 insertions, 2 deletions
diff --git a/contrib/gcc/config/i386/i386.c b/contrib/gcc/config/i386/i386.c
index a5932219f3366..3e8fc2cdeec58 100644
--- a/contrib/gcc/config/i386/i386.c
+++ b/contrib/gcc/config/i386/i386.c
@@ -10632,8 +10632,8 @@ ix86_constant_alignment (exp, align)
else if (ALIGN_MODE_128 (TYPE_MODE (TREE_TYPE (exp))) && align < 128)
return 128;
}
- else if (TREE_CODE (exp) == STRING_CST && TREE_STRING_LENGTH (exp) >= 31
- && align < 256)
+ else if (TREE_CODE (exp) == STRING_CST && !TARGET_NO_ALIGN_LONG_STRINGS
+ && TREE_STRING_LENGTH (exp) >= 31 && align < 256)
return 256;
return align;
diff --git a/contrib/gcc/config/i386/i386.h b/contrib/gcc/config/i386/i386.h
index cb3739393c4ec..df2f346e67ec7 100644
--- a/contrib/gcc/config/i386/i386.h
+++ b/contrib/gcc/config/i386/i386.h
@@ -138,6 +138,7 @@ extern int target_flags;
#define MASK_64BIT 0x02000000 /* Produce 64bit code */
/* ... overlap with subtarget options starts by 0x04000000. */
#define MASK_NO_RED_ZONE 0x04000000 /* Do not use red zone */
+#define MASK_NO_ALIGN_LONG_STRINGS 0x08000000 /* Do not align long strings specially */
/* Use the floating point instructions */
#define TARGET_80387 (target_flags & MASK_80387)
@@ -286,6 +287,8 @@ extern int x86_prefetch_sse;
#define TARGET_RED_ZONE (!(target_flags & MASK_NO_RED_ZONE))
+#define TARGET_NO_ALIGN_LONG_STRINGS (target_flags & MASK_NO_ALIGN_LONG_STRINGS)
+
/* WARNING: Do not mark empty strings for translation, as calling
gettext on an empty string does NOT return an empty
string. */
@@ -384,6 +387,10 @@ extern int x86_prefetch_sse;
N_("Use red-zone in the x86-64 code") }, \
{ "no-red-zone", MASK_NO_RED_ZONE, \
N_("Do not use red-zone in the x86-64 code") }, \
+ { "no-align-long-strings", MASK_NO_ALIGN_LONG_STRINGS, \
+ N_("Do not align long strings specially") }, \
+ { "align-long-strings", -MASK_NO_ALIGN_LONG_STRINGS, \
+ N_("Align strings longer than 30 on a 32-byte boundary") }, \
SUBTARGET_SWITCHES \
{ "", TARGET_DEFAULT, 0 }}