]> Cypherpunks.ru repositories - gostls13.git/blobdiff - src/runtime/runtime.c
[dev.power64] all: merge default (dd5014ed9b01) into dev.power64
[gostls13.git] / src / runtime / runtime.c
index c823691ec5a178ca27f1ef5f2d60cdede2be83a1..f19f8e4be3c397aab8da7923d47ea56ef324cbad 100644 (file)
@@ -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");