diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2018-01-25 17:44:19 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2018-01-25 17:44:19 +0000 |
commit | b445d0b89283fff9f0c60a2dcaf0f540921dfec1 (patch) | |
tree | c538ad105bcf5484334faf79a5d0f5116ea5862c /libgo | |
parent | 22af35f62c644e90be9ed6c20fc598ac88f5b987 (diff) |
runtime: fix lfstackUnpack on ia64
The top three region number bits must be masked out before
right-shifting the address bits into place, otherwise they will be
copied down into the lower always-zero address bits.
Reviewed-on: https://go-review.googlesource.com/84535
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257061 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo')
-rw-r--r-- | libgo/go/runtime/lfstack_64bit.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libgo/go/runtime/lfstack_64bit.go b/libgo/go/runtime/lfstack_64bit.go index 44cbf74cae0..95d0eba57a6 100644 --- a/libgo/go/runtime/lfstack_64bit.go +++ b/libgo/go/runtime/lfstack_64bit.go @@ -78,7 +78,7 @@ func lfstackUnpack(val uint64) *lfnode { return (*lfnode)(unsafe.Pointer(uintptr(int64(val) >> sparcLinuxCntBits << 3))) } if GOARCH == "ia64" { - return (*lfnode)(unsafe.Pointer(uintptr((val>>ia64CntBits<<3)&(1<<(64-3)-1) | val&^(1<<(64-3)-1)))) + return (*lfnode)(unsafe.Pointer(uintptr(((val & (1<<(64-3) - 1)) >> ia64CntBits << 3) | val&^(1<<(64-3)-1)))) } if GOARCH == "ppc64" && GOOS == "aix" { if val&(1<<63) != 0 { |