Commit 31be6285 authored by eric fang's avatar eric fang Committed by Eric Fang
Browse files

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: default avatarEric Fang <eric.fang@arm.com>
Reviewed-by: default avatarCherry Mui <cherryyz@google.com>
parent 0043c1ef
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment