]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: use STP/LDP around morestack on arm64
authorKeith Randall <khr@golang.org>
Mon, 21 Oct 2024 22:36:38 +0000 (15:36 -0700)
committerKeith Randall <khr@google.com>
Tue, 22 Oct 2024 16:23:12 +0000 (16:23 +0000)
commit74163c895a7c5d7ebafeaed1f4a0891d218e2704
treee795bf155e9ce0aee3987f79f98743e56614318b
parent4e7025860129b33f704634583d20539af19c344b
cmd/compile: use STP/LDP around morestack on arm64

The spill/restore code around morestack is almost never exectued, so
we should make it as small as possible. Using 2-register loads/stores
makes sense here. Also, the offsets from SP are pretty small so the
offset almost always fits in the (smaller than a normal load/store)
offset field of the instruction.

Makes cmd/go 0.6% smaller.

Change-Id: I8845283c1b269a259498153924428f6173bda293
Reviewed-on: https://go-review.googlesource.com/c/go/+/621556
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
src/cmd/compile/internal/arm64/ssa.go
src/cmd/internal/obj/link.go
test/codegen/spills.go [new file with mode: 0644]