summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2011-11-25 05:23:09 +0000
committermiod <miod@openbsd.org>2011-11-25 05:23:09 +0000
commit24cce7451cb98bde88a6da81c99472145fb82d38 (patch)
tree7f003de1c948f4e581571a9b76c2f4b384b6b16a
parentAllow MD backend to prevent the optimization of a bcopy() or memmove() of (diff)
downloadwireguard-openbsd-24cce7451cb98bde88a6da81c99472145fb82d38.tar.xz
wireguard-openbsd-24cce7451cb98bde88a6da81c99472145fb82d38.zip
Final configuration bits for gcc4: require alignment of local arrays on
word boundaries, and enable the builtins.c `one-byte memcpy' workaround.
-rw-r--r--gnu/gcc/gcc/config/alpha/alpha.h7
-rw-r--r--gnu/gcc/gcc/config/alpha/openbsd.h3
2 files changed, 6 insertions, 4 deletions
diff --git a/gnu/gcc/gcc/config/alpha/alpha.h b/gnu/gcc/gcc/config/alpha/alpha.h
index ed02c9f3e8e..3e0c5b0f9fe 100644
--- a/gnu/gcc/gcc/config/alpha/alpha.h
+++ b/gnu/gcc/gcc/config/alpha/alpha.h
@@ -373,12 +373,11 @@ extern enum alpha_fp_trap_mode alpha_fptm;
/* Align all constants and variables to at least a word boundary so
we can pick up pieces of them faster. */
-/* ??? Only if block-move stuff knows about different source/destination
- alignment. */
-#if 0
#define CONSTANT_ALIGNMENT(EXP, ALIGN) MAX ((ALIGN), BITS_PER_WORD)
#define DATA_ALIGNMENT(EXP, ALIGN) MAX ((ALIGN), BITS_PER_WORD)
-#endif
+
+/* Make local arrays of chars word-aligned for the same reasons. */
+#define LOCAL_ALIGNMENT(TYPE, ALIGN) DATA_ALIGNMENT (TYPE, ALIGN)
/* Set this nonzero if move instructions will actually fail to work
when given unaligned data.
diff --git a/gnu/gcc/gcc/config/alpha/openbsd.h b/gnu/gcc/gcc/config/alpha/openbsd.h
index 3dee9c0a911..61f09a776f5 100644
--- a/gnu/gcc/gcc/config/alpha/openbsd.h
+++ b/gnu/gcc/gcc/config/alpha/openbsd.h
@@ -83,3 +83,6 @@ Boston, MA 02110-1301, USA. */
/* don't want no friggin' stack checks. */
#undef STACK_CHECK_BUILTIN
#define STACK_CHECK_BUILTIN 0
+
+/* don't want bcopy() optimized into memmove() unless correctly aligned */
+#define SUBWORD_ACCESS_P (TARGET_BWX)