aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/sys_linux_arm64.s
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2015-07-29 15:04:30 -0400
committerRuss Cox <rsc@golang.org>2015-07-29 21:35:35 +0000
commit421220571d1ae7c78131f8a01ea3d5aca6a92160 (patch)
treebd82ee8929baa6039e41a429fbacbbcd279dbae7 /src/runtime/sys_linux_arm64.s
parent3952057cf6597981efcc066349fcfae746333f83 (diff)
downloadgo-421220571d1ae7c78131f8a01ea3d5aca6a92160.tar.xz
runtime, reflect: use correctly aligned stack frame sizes on arm64
arm64 requires either no stack frame or a frame with a size that is 8 mod 16 (adding the saved LR will make it 16-aligned). The cmd/internal/obj/arm64 has been silently aligning frames, but it led to a terrible bug when the compiler and obj disagreed on the frame size, and it's just generally confusing, so we're going to make misaligned frames an error instead of something that is silently changed. This CL prepares by updating assembly files. Note that the changes in this CL are already being done silently by cmd/internal/obj/arm64, so there is no semantic effect here, just a clarity effect. For #9880. Change-Id: Ibd6928dc5fdcd896c2bacd0291bf26b364591e28 Reviewed-on: https://go-review.googlesource.com/12845 Reviewed-by: Austin Clements <austin@google.com>
Diffstat (limited to 'src/runtime/sys_linux_arm64.s')
-rw-r--r--src/runtime/sys_linux_arm64.s6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/runtime/sys_linux_arm64.s b/src/runtime/sys_linux_arm64.s
index 998484f121..7b58d67305 100644
--- a/src/runtime/sys_linux_arm64.s
+++ b/src/runtime/sys_linux_arm64.s
@@ -115,7 +115,7 @@ TEXT runtime·getrlimit(SB),NOSPLIT,$-8-20
MOVW R0, ret+16(FP)
RET
-TEXT runtime·usleep(SB),NOSPLIT,$16-4
+TEXT runtime·usleep(SB),NOSPLIT,$24-4
MOVWU usec+0(FP), R3
MOVD R3, R5
MOVW $1000000, R4
@@ -180,7 +180,7 @@ TEXT runtime·mincore(SB),NOSPLIT,$-8-28
RET
// func now() (sec int64, nsec int32)
-TEXT time·now(SB),NOSPLIT,$16-12
+TEXT time·now(SB),NOSPLIT,$24-12
MOVD RSP, R0
MOVD $0, R1
MOVD $SYS_gettimeofday, R8
@@ -193,7 +193,7 @@ TEXT time·now(SB),NOSPLIT,$16-12
MOVW R5, nsec+8(FP)
RET
-TEXT runtime·nanotime(SB),NOSPLIT,$16-8
+TEXT runtime·nanotime(SB),NOSPLIT,$24-8
MOVW $1, R0 // CLOCK_MONOTONIC
MOVD RSP, R1
MOVD $SYS_clock_gettime, R8