]> Cypherpunks repositories - gostls13.git/commit
runtime: use new CNT_MASK in lfstack
authorIan Lance Taylor <iant@golang.org>
Sun, 27 Jan 2013 02:16:43 +0000 (18:16 -0800)
committerIan Lance Taylor <iant@golang.org>
Sun, 27 Jan 2013 02:16:43 +0000 (18:16 -0800)
commite65c0a82ce6c8c8fe06622f95bf713d1a962eee0
treec48bc0dc9fccf6bd13817c0b8751a210e4ae9835
parent75104237c82f943bffc41334acd179cf28f30ea2
runtime: use new CNT_MASK in lfstack

This is for SPARC64, a 64-bit processor that uses all 64-bits
of virtual addresses.  The idea is to use the low order 3 bits
to at least get a small ABA counter.  That should work since
pointers are aligned.  The idea is for SPARC64 to set CNT_MASK
== 7, PTR_BITS == 0, PTR_MASK == 0xffffffffffffff8.

Also add uintptr casts to avoid GCC warnings.  The gccgo
runtime code is compiled with GCC, and GCC warns when casting
between a pointer and a type of a different size.

R=dvyukov
CC=golang-dev
https://golang.org/cl/7225043
src/pkg/runtime/lfstack.c