diff options
| author | Joel Sing <joel@sing.id.au> | 2023-05-02 03:42:30 +1000 |
|---|---|---|
| committer | Joel Sing <joel@sing.id.au> | 2023-07-31 16:37:49 +0000 |
| commit | 3313b39bae9ee6b830fecaaaaa004de646f82e50 (patch) | |
| tree | 32f739e3ca92f012c93e22efe091e16404db4914 /src/cmd/internal/obj/arm64/a.out.go | |
| parent | a37da52d75e7268943e4a9879736fd0c04998ddf (diff) | |
| download | go-3313b39bae9ee6b830fecaaaaa004de646f82e50.tar.xz | |
cmd/internal/obj/arm64: improve classification of loads and stores
Currently, pool literals are added when they are not needed, namely
in the case where the offset is a 24 bit unsigned scaled immediate.
By improving the classification of loads and stores, we can avoid
generating unused pool literals. However, more importantly this
provides a basis for further improvement of the load and store
code generation.
Updates #59615
Change-Id: Ia3bad1709314565a05894a76c434cca2fa4533c4
Reviewed-on: https://go-review.googlesource.com/c/go/+/512538
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: David Chase <drchase@google.com>
Run-TryBot: Joel Sing <joel@sing.id.au>
TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/cmd/internal/obj/arm64/a.out.go')
| -rw-r--r-- | src/cmd/internal/obj/arm64/a.out.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cmd/internal/obj/arm64/a.out.go b/src/cmd/internal/obj/arm64/a.out.go index 359ac85693..2289904d92 100644 --- a/src/cmd/internal/obj/arm64/a.out.go +++ b/src/cmd/internal/obj/arm64/a.out.go @@ -414,7 +414,8 @@ const ( C_UAUTO32K_16 // 0 to 32760, 0 mod 16 + C_PSAUTO C_UAUTO32K // 0 to 32760, 0 mod 8 + C_PSAUTO C_UAUTO64K // 0 to 65520, 0 mod 16 + C_PSAUTO - C_LAUTO // any other 32-bit constant + C_LAUTOPOOL // any other constant up to 64 bits (needs pool literal) + C_LAUTO // any other constant up to 64 bits C_SEXT1 // 0 to 4095, direct C_SEXT2 // 0 to 8190 @@ -454,6 +455,7 @@ const ( C_UOREG32K_16 C_UOREG32K C_UOREG64K + C_LOREGPOOL C_LOREG C_ADDR // TODO(aram): explain difference from C_VCONADDR |
