]> Cypherpunks repositories - gostls13.git/commit
cmd/asm: recognize CR1-CR7 on ppc64x branch instructions
authorLynn Boger <laboger@linux.vnet.ibm.com>
Wed, 12 Oct 2016 12:50:30 +0000 (07:50 -0500)
committerDavid Chase <drchase@google.com>
Wed, 12 Oct 2016 21:17:47 +0000 (21:17 +0000)
commit6da8bdd2cc7a10f037a2025ffed57627d97a990c
treeef97b650f69506ca2e514e6293ec04c774c7c9d7
parent442de98c14d49bf306ab880e9f9c898ca0ae7c19
cmd/asm: recognize CR1-CR7 on ppc64x branch instructions

Some of the branch instructions (BEQ, BNE, BLT, etc.) accept
all the valid CR values as operands, but the CR register value is
not parsed and not put into the instruction, so that CR0 is always
used regardless of what was specified on the instruction.  For example
BEQ CR2,label becomes beq cr0,label.

This adds the change to the PPC64 assembler to recognize the CR value
and set the approppriate field in the instruction so the correct
CR is used.  This also adds some general comments on the branch
instruction BC and its operand values.

Fixes #17408

Change-Id: I8e956372a42846a4c09a7259e9172eaa29118e71
Reviewed-on: https://go-review.googlesource.com/30930
Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
src/cmd/internal/obj/ppc64/a.out.go
src/cmd/internal/obj/ppc64/asm9.go