]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: fix incorrect shift count type with s390x rules
authorRuixin Bao <ruixin.bao@ibm.com>
Wed, 9 Dec 2020 21:55:37 +0000 (13:55 -0800)
committerKeith Randall <khr@golang.org>
Mon, 14 Dec 2020 17:17:59 +0000 (17:17 +0000)
commita58be734eacd832be27a021b8ffac323061212f2
tree79674651136f657a18ba4ea88e6db17d64ede4ce
parent64d8846aaef4b64d2649917581069c0ec30ca561
cmd/compile: fix incorrect shift count type with s390x rules

The type of the shift count must be an unsigned integer. Some s390x
rules for shift have their auxint type being int8. This results in a
compilation failure on s390x with an invalid operation when running
make.bash using older versions of go (e.g: go1.10.4).

This CL adds an auxint type of uint8 and changes the ops for shift and
rotate to use auxint with type uint8. The related rules are also
modified to address this change.

Fixes #43090

Change-Id: I594274b6e3d9b23092fc9e9f4b354870164f2f19
Reviewed-on: https://go-review.googlesource.com/c/go/+/277078
Reviewed-by: Keith Randall <khr@golang.org>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
src/cmd/compile/internal/ssa/check.go
src/cmd/compile/internal/ssa/gen/S390X.rules
src/cmd/compile/internal/ssa/gen/S390XOps.go
src/cmd/compile/internal/ssa/gen/rulegen.go
src/cmd/compile/internal/ssa/op.go
src/cmd/compile/internal/ssa/opGen.go
src/cmd/compile/internal/ssa/rewriteS390X.go
src/cmd/internal/obj/s390x/rotate.go
src/cmd/internal/obj/s390x/rotate_test.go