]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: use numeric condition code masks on s390x
authorMichael Munday <mike.munday@ibm.com>
Fri, 13 Sep 2019 12:28:49 +0000 (13:28 +0100)
committerMichael Munday <mike.munday@ibm.com>
Thu, 26 Sep 2019 14:47:12 +0000 (14:47 +0000)
commitcf03238020365e3adc86c312c78920d9dc2f780a
tree8c5ae3c74515381c2cf12f07bfc47bc968261a42
parent8506b7d42fa696a8a7ca7cea747e1509286fdfba
cmd/compile: use numeric condition code masks on s390x

Prior to this CL conditional branches on s390x always used an
extended mnemonic such as BNE, BLT and so on to represent branch
instructions with different condition code masks. This CL adds
support for numeric condition code masks to the s390x SSA backend
so that we can encode the condition under which a Block's
successor is chosen as a field in that Block rather than in its
type.

This change will be useful as we come to add support for combined
compare-and-branch instructions. Rather than trying to add extended
mnemonics for every possible combination of mask and compare-and-
branch instruction we can instead use a single mnemonic for each
instruction.

Change-Id: Idb7458f187b50906877d683695c291dff5279553
Reviewed-on: https://go-review.googlesource.com/c/go/+/197178
Reviewed-by: Keith Randall <khr@golang.org>
13 files changed:
src/cmd/compile/internal/s390x/ssa.go
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/main.go
src/cmd/compile/internal/ssa/gen/rulegen.go
src/cmd/compile/internal/ssa/loop_test.go
src/cmd/compile/internal/ssa/op.go
src/cmd/compile/internal/ssa/opGen.go
src/cmd/compile/internal/ssa/rewriteS390X.go
src/cmd/compile/internal/ssa/value.go
src/cmd/internal/obj/s390x/asmz.go
src/cmd/internal/obj/s390x/condition_code.go [new file with mode: 0644]