summaryrefslogtreecommitdiff
path: root/src/cmd
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2014-08-15 15:22:33 -0400
committerRuss Cox <rsc@golang.org>2014-08-15 15:22:33 -0400
commitac4f097bb640c032692354736617eeaddf33399a (patch)
tree9215cfff34f6d29e369100189740c00c7be51a33 /src/cmd
parentd34c536b6e9f2e3c883c91c9144cc821aa5f7c44 (diff)
downloadgo-ac4f097bb640c032692354736617eeaddf33399a.tar.gz
[dev.power64] runtime: make all bitmaps arrays of bytes
The "simpler faster garbage collector" is full of little-endian assumptions. Instead of trying to correct all the mistakes, just give in and make everything use bytes. LGTM=minux R=minux CC=dvyukov, golang-codereviews https://codereview.appspot.com/124400043
Diffstat (limited to 'src/cmd')
-rw-r--r--src/cmd/gc/plive.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cmd/gc/plive.c b/src/cmd/gc/plive.c
index e67b0af75..716cdd108 100644
--- a/src/cmd/gc/plive.c
+++ b/src/cmd/gc/plive.c
@@ -1939,7 +1939,11 @@ twobitwritesymbol(Array *arr, Sym *sym)
break;
for(j = 0; j < bv->n; j += 32) {
word = bv->b[j/32];
- off = duint32(sym, off, word);
+ // Runtime reads the bitmaps as byte arrays. Oblige.
+ off = duint8(sym, off, word);
+ off = duint8(sym, off, word>>8);
+ off = duint8(sym, off, word>>16);
+ off = duint8(sym, off, word>>24);
}
}
duint32(sym, 0, i); // number of bitmaps