]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/obj/arm64: improve splitting of 24 bit unsigned scaled immediates
authorJoel Sing <joel@sing.id.au>
Sat, 29 Apr 2023 10:29:41 +0000 (20:29 +1000)
committerJoel Sing <joel@sing.id.au>
Mon, 31 Jul 2023 16:39:36 +0000 (16:39 +0000)
commit6eaad824e56aec91266854bf7890a94c3f08b614
treecbf6a147f0aaee20e26fae62da66a1a5b00d4378
parent03bec7dc6ff6bbcdf077753230cee11211aa78ba
cmd/internal/obj/arm64: improve splitting of 24 bit unsigned scaled immediates

The previous implementation would limit itself to 0xfff000 | 0xfff << shift,
while the maximum possible value is 0xfff000 + 0xfff << shift. In practical
terms, this means that an additional ((1 << shift) - 1) * 0x1000 of offset
is reachable for operations that use this splitting format. In the case of
an 8 byte load/store, this is an additional 0x7000 that can be reached
without needing to use the literal pool.

Updates #59615

Change-Id: Ice7023104042d31c115eafb9398c2b999bdd6583
Reviewed-on: https://go-review.googlesource.com/c/go/+/512540
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Run-TryBot: Joel Sing <joel@sing.id.au>
src/cmd/asm/internal/asm/testdata/arm64.s
src/cmd/internal/obj/arm64/asm7.go
src/cmd/internal/obj/arm64/asm_arm64_test.go