mirror of
https://github.com/golang/go
synced 2024-11-27 03:31:29 -07:00
f2eea4c1dc
mips SRA/SLL/SRL shift amounts are used mod 32; this change aligns the XXXconst rules to mask the shift amount by &31. Passes $ GOARCH=mips go build -toolexec 'toolstash -cmp' -a std $ GOARCH=mipsle go build -toolexec 'toolstash -cmp' -a std Fixes #42587 Change-Id: I6003ebd0bc500fba4cf6fb10254e1b557bf8c48f Reviewed-on: https://go-review.googlesource.com/c/go/+/270117 Trust: Alberto Donizetti <alb.donizetti@gmail.com> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
16 lines
263 B
Go
16 lines
263 B
Go
// compile
|
|
|
|
// Copyright 2020 The Go Authors. All rights reserved. Use of this
|
|
// source code is governed by a BSD-style license that can be found in
|
|
// the LICENSE file.
|
|
|
|
package p
|
|
|
|
func f() {
|
|
var i, j int
|
|
_ = func() {
|
|
i = 32
|
|
j = j>>i | len([]int{})
|
|
}
|
|
}
|