]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/obj: consolidate MOVB cases with other MOV ops on ppc64
authorPaul E. Murphy <murp@ibm.com>
Tue, 9 Mar 2021 22:55:16 +0000 (16:55 -0600)
committerLynn Boger <laboger@linux.vnet.ibm.com>
Fri, 7 May 2021 16:08:24 +0000 (16:08 +0000)
commit9bfa6f75d54a63c8c56cfb5c04d10937b27c4738
tree53a8a9a93c5892e8d4d34afaa65b01166dfc3726
parenta0eb662d85fd4815dfec3093e8205b9aed462507
cmd/internal/obj: consolidate MOVB cases with other MOV ops on ppc64

We can consolidate MOVB load handling with other MOV* loads. Only
Optab.Size bytes are copied from the slice returned by asmout. Thus,
we can an unconditionally append an extsb operation to the slice
modified by asmout. This extra instruction will only be copied into
the final instruction stream if Optab.Size is 4 bytes larger, as is
the case with MOVB loads.

This removes three extra special cases when loading a signed
byte.

Change-Id: I71f5324551a06a2c3fa28177109aafbe27f3e4cd
Reviewed-on: https://go-review.googlesource.com/c/go/+/314849
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
Reviewed-by: Carlos Eduardo Seo <carlos.seo@linaro.org>
Run-TryBot: Paul Murphy <murp@ibm.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Carlos Eduardo Seo <carlos.seo@linaro.org>
src/cmd/internal/obj/ppc64/asm9.go