diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2006-11-14 19:49:00 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2006-11-14 19:49:00 +0000 |
commit | 85144f2d2921be45cd8060b040ef946d4cee6684 (patch) | |
tree | 97d286992d6a9034a03275790fa4598a09c0eb32 /gnu/usr.bin | |
parent | fb6c85a39c13a70c4bf6adad9a35a57271e50e47 (diff) |
Do not align jump targets to cache line boundaries at -O2 on OpenBSD.
Diffstat (limited to 'gnu/usr.bin')
-rw-r--r-- | gnu/usr.bin/gcc/gcc/config/sh/openbsd.h | 4 | ||||
-rw-r--r-- | gnu/usr.bin/gcc/gcc/config/sh/sh.h | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/gnu/usr.bin/gcc/gcc/config/sh/openbsd.h b/gnu/usr.bin/gcc/gcc/config/sh/openbsd.h index ce6af42e356..6511bcb0a86 100644 --- a/gnu/usr.bin/gcc/gcc/config/sh/openbsd.h +++ b/gnu/usr.bin/gcc/gcc/config/sh/openbsd.h @@ -109,3 +109,7 @@ do \ } \ } \ while (0) + +/* We do not want jump targets to be aligned on cache line boundaries at -O2 */ +#undef SH_PREFERRED_ALIGN_JUMPS +#define SH_PREFERRED_ALIGN_JUMPS 2 diff --git a/gnu/usr.bin/gcc/gcc/config/sh/sh.h b/gnu/usr.bin/gcc/gcc/config/sh/sh.h index bd0e60e6282..d88c53505d9 100644 --- a/gnu/usr.bin/gcc/gcc/config/sh/sh.h +++ b/gnu/usr.bin/gcc/gcc/config/sh/sh.h @@ -401,6 +401,10 @@ do { \ extern int assembler_dialect; +#ifndef SH_PREFERRED_ALIGN_JUMPS +#define SH_PREFERRED_ALIGN_JUMPS (1 << CACHE_LOG) +#endif + #define OVERRIDE_OPTIONS \ do { \ int regno; \ @@ -481,7 +485,7 @@ do { \ if (align_loops == 0) \ align_loops = 1 << (TARGET_SH5 ? 3 : 2); \ if (align_jumps == 0) \ - align_jumps = 1 << CACHE_LOG; \ + align_jumps = SH_PREFERRED_ALIGN_JUMPS; \ else if (align_jumps < (TARGET_SHMEDIA ? 4 : 2)) \ align_jumps = TARGET_SHMEDIA ? 4 : 2; \ \ |