summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2013-04-11 20:58:35 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2013-04-11 20:58:35 +0000
commitd6329d5e000c53622793c67098cfb4f871f227f8 (patch)
tree3476c64f600ae6dbf098fac2a001a3830e65ab5b /gnu
parentc6f87be04ebaa54a85855700298946afc979cb72 (diff)
Do not abuse -finhibit-size-directive to control tight code alignment:
- turn FUNCTION_BOUNDARY into a constant, as intended, since its value is used (among other things) to decide the alignment to expect from a function pointer value. - remove LABEL_ALIGN_AFTER_BARRIER. There is no reason to align jump destinations on half a cache line, and the MI default for this value is good enough. However, in order to preserve the intent of what FUNCTION_BOUNDARY used to be defined as, initialize align_functions to sensible values in m88k_override_options(), unless -falign-functions=... is specified.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/gcc/gcc/config/m88k/m88k.c5
-rw-r--r--gnu/usr.bin/gcc/gcc/config/m88k/m88k.h14
2 files changed, 7 insertions, 12 deletions
diff --git a/gnu/usr.bin/gcc/gcc/config/m88k/m88k.c b/gnu/usr.bin/gcc/gcc/config/m88k/m88k.c
index 07cb561b2ae..0b373c856d7 100644
--- a/gnu/usr.bin/gcc/gcc/config/m88k/m88k.c
+++ b/gnu/usr.bin/gcc/gcc/config/m88k/m88k.c
@@ -3191,4 +3191,9 @@ m88k_override_options ()
if (TARGET_OMIT_LEAF_FRAME_POINTER) /* keep nonleaf frame pointers */
flag_omit_frame_pointer = 1;
+
+ /* On the m88100, it is desirable to align functions to a cache line.
+ The m88110 cache is small, so align to an 8 byte boundary. */
+ if (align_functions == 0)
+ align_functions = TARGET_88100 ? 16 : 8;
}
diff --git a/gnu/usr.bin/gcc/gcc/config/m88k/m88k.h b/gnu/usr.bin/gcc/gcc/config/m88k/m88k.h
index 16f874a6125..bcfa7d41281 100644
--- a/gnu/usr.bin/gcc/gcc/config/m88k/m88k.h
+++ b/gnu/usr.bin/gcc/gcc/config/m88k/m88k.h
@@ -238,12 +238,8 @@ extern int target_flags; /* -m compiler switches */
/* Boundary (in *bits*) on which stack pointer should be aligned. */
#define STACK_BOUNDARY 128
-/* Allocation boundary (in *bits*) for the code of a function. On the
- m88100, it is desirable to align to a cache line. However, SVR3 targets
- only provided 8 byte alignment. The m88110 cache is small, so align
- to an 8 byte boundary. Pack code tightly when compiling crtstuff.c. */
-#define FUNCTION_BOUNDARY (flag_inhibit_size_directive ? 32 : \
- (TARGET_88100 ? 128 : 64))
+/* Allocation boundary (in *bits*) for the code of a function. */
+#define FUNCTION_BOUNDARY 32
/* No data type wants to be aligned rounder than this. */
#define BIGGEST_ALIGNMENT 64
@@ -1762,12 +1758,6 @@ do { \
if ((LOG) != 0) \
fprintf (FILE, "%s%d\n", ALIGN_ASM_OP, 1<<(LOG))
-/* On the m88100, align the text address to half a cache boundary when it
- can only be reached by jumping. Pack code tightly when compiling
- crtstuff.c. */
-#define LABEL_ALIGN_AFTER_BARRIER(LABEL) \
- (TARGET_88100 && !flag_inhibit_size_directive ? 3 : 2)
-
/* Override elfos.h. */
#undef ASM_OUTPUT_EXTERNAL_LIBCALL