]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: move arm64 over to new bounds check strategy
authorKeith Randall <khr@golang.org>
Wed, 18 Jun 2025 22:06:55 +0000 (15:06 -0700)
committerKeith Randall <khr@golang.org>
Thu, 24 Jul 2025 23:06:09 +0000 (16:06 -0700)
commit394d0bee8d1ad62ba88d4a3b2d93427d6a8ceb33
treef01a1ae217fb040eaa771b893194d3bdbcabee9f
parent3024785b929cd8a740da87e1c24aef2c9b30e019
cmd/compile: move arm64 over to new bounds check strategy

For all the static bounds checks in cmd/go, we have:

    6877    just a single instruction (the call itself)
    139     needs an additional reg-reg move
    602     needs an additional constant load
    25      needs some other instruction

that's ~90% implemented using just a single instruction.

Reduces the text size of cmd/go by ~0.8%.
Total binary size is just barely smaller, ~0.2%. (The difference
is the new pcdata table.)

Change-Id: I416e9c196f5d8d0e8f08e191e6df3045e11dccbe
Reviewed-on: https://go-review.googlesource.com/c/go/+/682496
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
src/cmd/compile/internal/arm64/ssa.go
src/cmd/compile/internal/ssa/_gen/ARM64.rules
src/cmd/compile/internal/ssa/_gen/ARM64Ops.go
src/cmd/compile/internal/ssa/opGen.go
src/cmd/compile/internal/ssa/rewriteARM64.go
src/internal/abi/abi.go
src/runtime/asm_arm64.s