Commit 055db850 by Ian Lance Taylor

runtime: Fix recent lfstack change on Solaris.

    
    Reviewed-on: https://go-review.googlesource.com/14922

From-SVN: r228087
parent f08e13f1
90ebe729992443dc00b19c76b28d1270e17245a4 66c113f1af300ce27b99f18f792901d7327d6699
The first line of this file holds the git revision number of the last The first line of this file holds the git revision number of the last
merge done from the gofrontend repository. merge done from the gofrontend repository.
...@@ -29,7 +29,6 @@ static inline LFNode* lfUnpack(uint64 val) { ...@@ -29,7 +29,6 @@ static inline LFNode* lfUnpack(uint64 val) {
// So we use 17msb of pointers as ABA counter. // So we use 17msb of pointers as ABA counter.
# define PTR_BITS 47 # define PTR_BITS 47
# endif # endif
# endif
# define CNT_BITS (64 - PTR_BITS + 3) # define CNT_BITS (64 - PTR_BITS + 3)
static inline uint64 lfPack(LFNode *node, uintptr cnt) { static inline uint64 lfPack(LFNode *node, uintptr cnt) {
return ((uint64)(node)<<(64-PTR_BITS)) | (cnt&(((1<<CNT_BITS)-1))); return ((uint64)(node)<<(64-PTR_BITS)) | (cnt&(((1<<CNT_BITS)-1)));
...@@ -37,6 +36,7 @@ static inline uint64 lfPack(LFNode *node, uintptr cnt) { ...@@ -37,6 +36,7 @@ static inline uint64 lfPack(LFNode *node, uintptr cnt) {
static inline LFNode* lfUnpack(uint64 val) { static inline LFNode* lfUnpack(uint64 val) {
return (LFNode*)((val >> CNT_BITS) << 3); return (LFNode*)((val >> CNT_BITS) << 3);
} }
# endif
#else #else
static inline uint64 lfPack(LFNode *node, uintptr cnt) { static inline uint64 lfPack(LFNode *node, uintptr cnt) {
return ((uint64)(uintptr)(node)<<32) | cnt; return ((uint64)(uintptr)(node)<<32) | cnt;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment