summaryrefslogtreecommitdiff
path: root/src/runtime/runtime.c
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2014-10-29 12:25:24 -0400
committerRuss Cox <rsc@golang.org>2014-10-29 12:25:24 -0400
commit710efc5a3085f55968c120abb25206fb72c05d46 (patch)
tree433262b4bdac6643d923971ea21bb39cb69822a7 /src/runtime/runtime.c
parent40520a21d8b050635a417666db959f75d757fff5 (diff)
parentcc517ca5f7183e7f5d91bf75897b23cc0f4ed04f (diff)
downloadgo-710efc5a3085f55968c120abb25206fb72c05d46.tar.gz
[dev.garbage] all: merge dev.power64 (5ad5e85cfb99) into dev.garbage
The goal here is to get the big-endian fixes so that in some upcoming code movement for write barriers I don't make them unmergeable. LGTM=rlh R=rlh CC=golang-codereviews https://codereview.appspot.com/166890043
Diffstat (limited to 'src/runtime/runtime.c')
-rw-r--r--src/runtime/runtime.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/runtime/runtime.c b/src/runtime/runtime.c
index c823691ec..f19f8e4be 100644
--- a/src/runtime/runtime.c
+++ b/src/runtime/runtime.c
@@ -185,6 +185,7 @@ runtime·check(void)
float64 j, j1;
byte *k, *k1;
uint16* l;
+ byte m[4];
struct x1 {
byte x;
};
@@ -236,6 +237,11 @@ runtime·check(void)
if(k != k1)
runtime·throw("casp3");
+ m[0] = m[1] = m[2] = m[3] = 0x1;
+ runtime·atomicor8(&m[1], 0xf0);
+ if (m[0] != 0x1 || m[1] != 0xf1 || m[2] != 0x1 || m[3] != 0x1)
+ runtime·throw("atomicor8");
+
*(uint64*)&j = ~0ULL;
if(j == j)
runtime·throw("float64nan");