aboutsummaryrefslogtreecommitdiff
path: root/libgo/runtime/parfor.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2017-01-23 18:15:22 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2017-01-23 18:15:22 +0000
commitb0147ac2e62c3ed744d55fc5d009c4ef7a8ef651 (patch)
tree807c3b6f6779fa8ab24d85323f1593d91af510de /libgo/runtime/parfor.c
parenta0488df43613f596dffc3f18118a0e3216f2f842 (diff)
downloadgcc-b0147ac2e62c3ed744d55fc5d009c4ef7a8ef651.zip
gcc-b0147ac2e62c3ed744d55fc5d009c4ef7a8ef651.tar.gz
gcc-b0147ac2e62c3ed744d55fc5d009c4ef7a8ef651.tar.bz2
re PR go/79037 (gccgo: Binaries crash with parforsetup: pos is not aligned on m68k)
PR go/79037 compiler, runtime: align gc data for m68k The current GC requires that the gc data be aligned to at least a 4 byte boundary, because it uses the lower two bits of the address for flags (see LOOP and PRECISE in runtime/mgc0.c). As the gc data is stored as a [...]uintptr, that is normally always true. However, on m68k, that only guarantees 2 byte alignment. Fix it by forcing the alignment. The parfor code used by the current GC requires that the parfor data be aligned to at least an 8 byte boundary. The code in parfor.c verifies this. This is normally true, as the data uses uint64_t values, but, again, this must be enforced explicitly on m68k. Fixes GCC PR 79037. Reviewed-on: https://go-review.googlesource.com/35478 From-SVN: r244824
Diffstat (limited to 'libgo/runtime/parfor.c')
-rw-r--r--libgo/runtime/parfor.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libgo/runtime/parfor.c b/libgo/runtime/parfor.c
index b49826f..d64d74c 100644
--- a/libgo/runtime/parfor.c
+++ b/libgo/runtime/parfor.c
@@ -11,7 +11,7 @@
struct ParForThread
{
// the thread's iteration space [32lsb, 32msb)
- uint64 pos;
+ uint64 pos __attribute__((aligned(8)));
// stats
uint64 nsteal;
uint64 nstealcnt;