aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2020-10-05 12:17:30 -0400
committerAustin Clements <austin@google.com>2020-10-05 17:03:05 +0000
commita517c3422e808ae51533a0700e05d59e8a799136 (patch)
treea28298e563f4d394aeb5ea2b3cef5b6c3db30e71 /src
parent40bff82885b8de850f909f38357c53670562f815 (diff)
downloadgo-a517c3422e808ae51533a0700e05d59e8a799136.tar.xz
runtime: clean up runtime.call* frame sizes on ARM64
ARM64 used to require that all assembly frame sizes were of the form 16*N+8 because ARM64 requires 16-byte SP alignment and the assembler added an 8 byte LR slot. This made all of the runtime.call* frame sizes wonky. The assembler now rounds up the frame size appropriately after adding any additional slots it needs, so this is no longer necessary. This CL cleans up the frame sizes of these functions so they look the way you'd expect and match all other architectures. Change-Id: I47819092296b8983c43eadf2e66c7c1e0d518555 Reviewed-on: https://go-review.googlesource.com/c/go/+/259448 Trust: Austin Clements <austin@google.com> Reviewed-by: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/runtime/asm_arm64.s56
1 files changed, 27 insertions, 29 deletions
diff --git a/src/runtime/asm_arm64.s b/src/runtime/asm_arm64.s
index 5eda3063d7..1f46d1962c 100644
--- a/src/runtime/asm_arm64.s
+++ b/src/runtime/asm_arm64.s
@@ -415,35 +415,33 @@ TEXT callRet<>(SB), NOSPLIT, $40-0
BL runtime·reflectcallmove(SB)
RET
-// These have 8 added to make the overall frame size a multiple of 16,
-// as required by the ABI. (There is another +8 for the saved LR.)
-CALLFN(·call16, 24 )
-CALLFN(·call32, 40 )
-CALLFN(·call64, 72 )
-CALLFN(·call128, 136 )
-CALLFN(·call256, 264 )
-CALLFN(·call512, 520 )
-CALLFN(·call1024, 1032 )
-CALLFN(·call2048, 2056 )
-CALLFN(·call4096, 4104 )
-CALLFN(·call8192, 8200 )
-CALLFN(·call16384, 16392 )
-CALLFN(·call32768, 32776 )
-CALLFN(·call65536, 65544 )
-CALLFN(·call131072, 131080 )
-CALLFN(·call262144, 262152 )
-CALLFN(·call524288, 524296 )
-CALLFN(·call1048576, 1048584 )
-CALLFN(·call2097152, 2097160 )
-CALLFN(·call4194304, 4194312 )
-CALLFN(·call8388608, 8388616 )
-CALLFN(·call16777216, 16777224 )
-CALLFN(·call33554432, 33554440 )
-CALLFN(·call67108864, 67108872 )
-CALLFN(·call134217728, 134217736 )
-CALLFN(·call268435456, 268435464 )
-CALLFN(·call536870912, 536870920 )
-CALLFN(·call1073741824, 1073741832 )
+CALLFN(·call16, 16)
+CALLFN(·call32, 32)
+CALLFN(·call64, 64)
+CALLFN(·call128, 128)
+CALLFN(·call256, 256)
+CALLFN(·call512, 512)
+CALLFN(·call1024, 1024)
+CALLFN(·call2048, 2048)
+CALLFN(·call4096, 4096)
+CALLFN(·call8192, 8192)
+CALLFN(·call16384, 16384)
+CALLFN(·call32768, 32768)
+CALLFN(·call65536, 65536)
+CALLFN(·call131072, 131072)
+CALLFN(·call262144, 262144)
+CALLFN(·call524288, 524288)
+CALLFN(·call1048576, 1048576)
+CALLFN(·call2097152, 2097152)
+CALLFN(·call4194304, 4194304)
+CALLFN(·call8388608, 8388608)
+CALLFN(·call16777216, 16777216)
+CALLFN(·call33554432, 33554432)
+CALLFN(·call67108864, 67108864)
+CALLFN(·call134217728, 134217728)
+CALLFN(·call268435456, 268435456)
+CALLFN(·call536870912, 536870912)
+CALLFN(·call1073741824, 1073741824)
// func memhash32(p unsafe.Pointer, h uintptr) uintptr
TEXT runtime·memhash32(SB),NOSPLIT|NOFRAME,$0-24