aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/runtime1.go
diff options
context:
space:
mode:
authorVladimir Stefanovic <vladimir.stefanovic@imgtec.com>2017-03-21 14:57:58 +0100
committerCherry Zhang <cherryyz@google.com>2017-03-21 16:03:12 +0000
commit24dc8c6cb52aaa2680d0817298d109cb12098cda (patch)
tree789bf0d299859a75e11ff34d5cdf16558a882c0a /src/runtime/runtime1.go
parent23bd9191361cccab5ca03aa2d65989efdf9d839c (diff)
downloadgo-24dc8c6cb52aaa2680d0817298d109cb12098cda.tar.gz
go-24dc8c6cb52aaa2680d0817298d109cb12098cda.zip
cmd/compile,runtime: fix atomic And8 for mipsle
Removing stray xori that came from big endian copy/paste. Adding atomicand8 check to runtime.check() that would have revealed this error. Might fix #19396. Change-Id: If8d6f25d3e205496163541eb112548aa66df9c2a Reviewed-on: https://go-review.googlesource.com/38257 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'src/runtime/runtime1.go')
-rw-r--r--src/runtime/runtime1.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/runtime/runtime1.go b/src/runtime/runtime1.go
index 2f7317b501..c0733481a8 100644
--- a/src/runtime/runtime1.go
+++ b/src/runtime/runtime1.go
@@ -259,6 +259,12 @@ func check() {
throw("atomicor8")
}
+ m = [4]byte{0xff, 0xff, 0xff, 0xff}
+ atomic.And8(&m[1], 0x1)
+ if m[0] != 0xff || m[1] != 0x1 || m[2] != 0xff || m[3] != 0xff {
+ throw("atomicand8")
+ }
+
*(*uint64)(unsafe.Pointer(&j)) = ^uint64(0)
if j == j {
throw("float64nan")