]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/obj/arm64: optimize stacksplit prologue for small stack
authoreric fang <eric.fang@arm.com>
Tue, 18 Jan 2022 08:49:56 +0000 (08:49 +0000)
committerEric Fang <eric.fang@arm.com>
Tue, 8 Mar 2022 02:01:53 +0000 (02:01 +0000)
commit31be6285a879af94c7283e6599e3f9b64266bc1a
tree56594b3265978eda12804e4080601ecfcc045461
parent0043c1efbb53e72cbd1b41c32812ca3c78d8e169
cmd/internal/obj/arm64: optimize stacksplit prologue for small stack

When framesize <= objabi.StackSmall, 128B, the stacksplit prologue is:
  MOVD 16(g), R16
  MOVD SP, R17
  CMP R16, R17
  BLS morestack_label

The second instruction is not necessary, we can compare R16 with SP
directly, so the sequence becomes:
  MOVD 16(g), R16
  CMP R16, SP
  BLS morestack_label

This CL removes this instruction.

Change-Id: I0567ac52e9be124880957271951e1186da203612
Reviewed-on: https://go-review.googlesource.com/c/go/+/379076
Trust: Eric Fang <eric.fang@arm.com>
Run-TryBot: Eric Fang <eric.fang@arm.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Eric Fang <eric.fang@arm.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
src/cmd/internal/obj/arm64/obj7.go