The Go programming language
Go to file
Paul E. Murphy 6ce543d137 [release-branch.go1.19] cmd/compile: on PPC64, fix sign/zero extension when masking
This backport required manual cleanup as go1.20 combined the
ANDCCconst and ANDconst opcodes into one. Similarly, CL 456736
introduced a suble bug by using (Select1 (ANDCCconst ...)). This
usually worked because the same rule quietly changes the type
of the newly created ANDCCconst to a tuple. This change exposed
the bug, so fix it too.

(ANDconst [y] (MOV.*reg x)) should only be merged when zero
extending. Otherwise, sign bits are lost on negative values.

(ANDconst [0xFF] (MOVBreg x)) should be simplified to a zero
extension of x. Likewise for the MOVHreg variant.

Fixes #61319

Change-Id: I04e4fd7dc6a826e870681f37506620d48393698b
Reviewed-on: https://go-review.googlesource.com/c/go/+/508775
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Paul Murphy <murp@ibm.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-on: https://go-review.googlesource.com/c/go/+/509018
Auto-Submit: Heschi Kreinick <heschi@google.com>
TryBot-Bypass: Heschi Kreinick <heschi@google.com>
2023-07-19 19:11:01 +00:00
.github .github: remove duplicate security link 2022-01-07 17:55:09 +00:00
api debug/pe: add IMAGE_FILE_MACHINE_LOONGARCH{64,32} 2022-06-29 22:29:34 +00:00
doc doc: move Go 1.19 release notes to x/website 2022-08-01 18:07:12 +00:00
lib/time lib/time, time/tzdata: update to 2022a 2022-05-31 08:53:53 +00:00
misc [release-branch.go1.19] misc/cgo/testcshared: handle unsuffixed dlltool path 2023-01-09 21:17:08 +00:00
src [release-branch.go1.19] cmd/compile: on PPC64, fix sign/zero extension when masking 2023-07-19 19:11:01 +00:00
test [release-branch.go1.19] cmd/compile: on PPC64, fix sign/zero extension when masking 2023-07-19 19:11:01 +00:00
.gitattributes
.gitignore internal/buildcfg: move build configuration out of cmd/internal/objabi 2021-04-16 19:20:53 +00:00
CONTRIBUTING.md
LICENSE
PATENTS
README.md README.md: update wiki link 2022-04-26 16:21:18 +00:00
SECURITY.md SECURITY.md: replace golang.org with go.dev 2022-04-26 19:59:47 +00:00
VERSION [release-branch.go1.19] go1.19.11 2023-07-11 16:38:32 +00:00
codereview.cfg [release-branch.go1.19] update codereview.cfg for release-branch.go1.19 2022-07-06 17:32:58 +00:00

README.md

The Go Programming Language

Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.

Gopher image Gopher image by Renee French, licensed under Creative Commons 3.0 Attributions license.

Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.

Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.

Download and Install

Binary Distributions

Official binary distributions are available at https://go.dev/dl/.

After downloading a binary release, visit https://go.dev/doc/install for installation instructions.

Install From Source

If a binary distribution is not available for your combination of operating system and architecture, visit https://go.dev/doc/install/source for source installation instructions.

Contributing

Go is the work of thousands of contributors. We appreciate your help!

To contribute, please read the contribution guidelines at https://go.dev/doc/contribute.

Note that the Go project uses the issue tracker for bug reports and proposals only. See https://go.dev/wiki/Questions for a list of places to ask questions about the Go language.