Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/asm, cmd/internal/obj/ppc64: minor updates to assembler for ppc64x #23845

Closed
laboger opened this issue Feb 15, 2018 · 4 comments
Closed

cmd/asm, cmd/internal/obj/ppc64: minor updates to assembler for ppc64x #23845

laboger opened this issue Feb 15, 2018 · 4 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@laboger
Copy link
Contributor

laboger commented Feb 15, 2018

What version of Go are you using (go version)?

tip

Does this issue reproduce with the latest release?

Issues to be addressed occur in the latest release

What operating system and processor architecture are you using (go env)?

ppc64le & ppc64

Multiple minor changes are planned for the assembler for ppc64x, including:

Add the opcodes for "immediate shifted" versions of the add, and, or, and xor instructions. These opcodes currently don't exist in the Go asm set, and the Power instructions are generated but in a way that is not clear. Adding these will making it easier for those writing algorithms in Go asm for Power, and also make it more straightforward when we split the cases now where sometimes an Go assembler instruction results in 2 or 3 Power instructions.

Add a few new opcodes for new functions like Round and load/store byte reversed.

Fix some cases where immediate values are loaded with more instructions than necessary.

@gopherbot
Copy link

Change https://golang.org/cl/94115 mentions this issue: cmd/asm, cmd/internal/obj/ppc64: add Immediate Shifted opcodes for ppc64x

gopherbot pushed a commit that referenced this issue Feb 15, 2018
…c64x

This change adds ADD/AND/OR/XOR Immediate Shifted instructions for
ppc64x so they are usable in Go asm code. These instructions were
originally present in asm9.go, but they were only usable in that
file (as -AADD, -AANDCC, -AOR, -AXOR). These old mnemonics are now
removed.

Updates #23845

Change-Id: Ifa2fac685e8bc628cb241dd446adfc3068181826
Reviewed-on: https://go-review.googlesource.com/94115
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
@gopherbot
Copy link

Change https://golang.org/cl/95135 mentions this issue: cmd/asm, cmd/internal/obj/ppc64: avoid unnecessary load zeros

gopherbot pushed a commit that referenced this issue Mar 8, 2018
When instructions add, and, or, xor, and movd have
constant operands in some cases more instructions are
generated than necessary by the assembler.

This adds more opcode/operand combinations to the optab
and improves the code generation for the cases where the
size and sign of the constant allows the use of 1
instructions instead of 2.

Example of previous code:
	oris r3, r0, 0
	ori  r3, r3, 65533

now:
	ori r3, r0, 65533

This does not significantly reduce the overall binary size
because the improvement depends on the constant value.
Some procedures show a 1-2% reduction in size. This improvement
could also be significant in cases where the extra instructions
occur in a critical loop.

Testcase ppc64enc.s was added to cmd/asm/internal/asm/testdata
with the variations affected by this change.

Updates #23845

Change-Id: I7fdf2320c95815d99f2755ba77d0c6921cd7fad7
Reviewed-on: https://go-review.googlesource.com/95135
Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
@gopherbot
Copy link

Change https://golang.org/cl/99635 mentions this issue: cmd/internal/obj/ppc64: implement full support for l*arx instructions

@andybons andybons added the NeedsFix The path to resolution is known, but the work has not been done. label Mar 8, 2018
@andybons andybons added this to the Unplanned milestone Mar 8, 2018
gopherbot pushed a commit that referenced this issue Mar 13, 2018
…ructions

The current implementation of l*arx instructions does not accept non-zero
offsets in RA nor the EH field. This change adds full functionality to those
instructions.

Updates #23845

Change-Id: If113f70d11de5f35f8389520b049390dbc40e863
Reviewed-on: https://go-review.googlesource.com/99635
Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
@laboger
Copy link
Contributor Author

laboger commented Apr 27, 2018

We have added all the changes we wanted for go 1.11.

@laboger laboger closed this as completed Apr 27, 2018
ceseo added a commit to powertechpreview/go that referenced this issue Aug 13, 2018
…ructions

The current implementation of l*arx instructions does not accept non-zero
offsets in RA nor the EH field. This change adds full functionality to those
instructions.

Updates golang#23845

Change-Id: If113f70d11de5f35f8389520b049390dbc40e863
Reviewed-on: https://go-review.googlesource.com/99635
Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
ceseo added a commit to powertechpreview/go that referenced this issue Aug 13, 2018
…c64x

This change adds ADD/AND/OR/XOR Immediate Shifted instructions for
ppc64x so they are usable in Go asm code. These instructions were
originally present in asm9.go, but they were only usable in that
file (as -AADD, -AANDCC, -AOR, -AXOR). These old mnemonics are now
removed.

Updates golang#23845

Change-Id: Ifa2fac685e8bc628cb241dd446adfc3068181826
Reviewed-on: https://go-review.googlesource.com/94115
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
@golang golang locked and limited conversation to collaborators Apr 27, 2019
@rsc rsc unassigned laboger Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

3 participants