aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/sys_windows_386.s
diff options
context:
space:
mode:
authorMatthew Dempsky <mdempsky@google.com>2016-09-29 21:34:44 -0700
committerMatthew Dempsky <mdempsky@google.com>2016-09-30 05:40:43 +0000
commit9828b7c468029d54e90846e5e2fc23fd6d39782a (patch)
treebe83352648dce15cab8ce070f4006e8ce7211953 /src/runtime/sys_windows_386.s
parent79db1625b929b8dad46c1537175b9412fd020851 (diff)
downloadgo-9828b7c468029d54e90846e5e2fc23fd6d39782a.tar.gz
go-9828b7c468029d54e90846e5e2fc23fd6d39782a.zip
runtime, syscall: use FP instead of SP for parameters
Consistently access function parameters using the FP pseudo-register instead of SP (e.g., x+0(FP) instead of x+4(SP) or x+8(SP), depending on register size). Two reasons: 1) doc/asm says the SP pseudo-register should use negative offsets in the range [-framesize, 0), and 2) cmd/vet only validates parameter offsets when indexed from the FP pseudo-register. No binary changes to the compiled object files for any of the affected package/OS/arch combinations. Change-Id: I0efc6079bc7519fcea588c114ec6a39b245d68b0 Reviewed-on: https://go-review.googlesource.com/30085 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/runtime/sys_windows_386.s')
-rw-r--r--src/runtime/sys_windows_386.s4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/runtime/sys_windows_386.s b/src/runtime/sys_windows_386.s
index 95130b733d..60302e05c4 100644
--- a/src/runtime/sys_windows_386.s
+++ b/src/runtime/sys_windows_386.s
@@ -309,7 +309,7 @@ TEXT runtime·callbackasm1+0(SB),NOSPLIT,$0
// void tstart(M *newm);
TEXT runtime·tstart(SB),NOSPLIT,$0
- MOVL newm+4(SP), CX // m
+ MOVL newm+0(FP), CX // m
MOVL m_g0(CX), DX // g
// Layout new m scheduler stack on os stack.
@@ -337,7 +337,7 @@ TEXT runtime·tstart(SB),NOSPLIT,$0
// uint32 tstart_stdcall(M *newm);
TEXT runtime·tstart_stdcall(SB),NOSPLIT,$0
- MOVL newm+4(SP), BX
+ MOVL newm+0(FP), BX
PUSHL BX
CALL runtime·tstart(SB)