diff options
| author | Srdjan Petrovic <spetrovic@google.com> | 2015-04-17 17:27:07 -0700 |
|---|---|---|
| committer | David Crawshaw <crawshaw@golang.org> | 2015-04-22 16:28:57 +0000 |
| commit | ca9128f18fe75878ba2d5e0df09ae755c085f72a (patch) | |
| tree | 14dc3f65d05c3425c251282b91b1fe1be2079895 /src/runtime/rt0_linux_amd64.s | |
| parent | 3f91a017f8f67cb9a744cf5d0a8b5db34a95808d (diff) | |
| download | go-ca9128f18fe75878ba2d5e0df09ae755c085f72a.tar.xz | |
runtime: merge clone0 and clone
We initially added clone0 to handle the case when G or M don't exist, but
it turns out that we could have just modified clone. (It also helps that
the function we're invoking in clone0 no longer needs arguments.)
As a side-effect, newosproc0 is now supported on all linux archs.
Change-Id: Ie603af75d8f164310fc16446052d83743961f3ca
Reviewed-on: https://go-review.googlesource.com/9164
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Diffstat (limited to 'src/runtime/rt0_linux_amd64.s')
| -rw-r--r-- | src/runtime/rt0_linux_amd64.s | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/src/runtime/rt0_linux_amd64.s b/src/runtime/rt0_linux_amd64.s index ee1dbc6cd1..cd7c55e6f5 100644 --- a/src/runtime/rt0_linux_amd64.s +++ b/src/runtime/rt0_linux_amd64.s @@ -12,13 +12,13 @@ TEXT _rt0_amd64_linux(SB),NOSPLIT,$-8 // When building with -buildmode=c-shared, this symbol is called when the shared // library is loaded. -TEXT _rt0_amd64_linux_lib(SB),NOSPLIT,$0x58 - MOVQ BX, 0x18(SP) - MOVQ BP, 0x20(SP) - MOVQ R12, 0x28(SP) - MOVQ R13, 0x30(SP) - MOVQ R14, 0x38(SP) - MOVQ R15, 0x40(SP) +TEXT _rt0_amd64_linux_lib(SB),NOSPLIT,$0x40 + MOVQ BX, 0x10(SP) + MOVQ BP, 0x18(SP) + MOVQ R12, 0x20(SP) + MOVQ R13, 0x28(SP) + MOVQ R14, 0x30(SP) + MOVQ R15, 0x38(SP) MOVQ DI, _rt0_amd64_linux_lib_argc<>(SB) MOVQ SI, _rt0_amd64_linux_lib_argv<>(SB) @@ -36,17 +36,16 @@ nocgo: MOVQ $8388608, 0(SP) // stacksize MOVQ $_rt0_amd64_linux_lib_go(SB), AX MOVQ AX, 8(SP) // fn - MOVQ $0, 0x10(SP) // fnarg MOVQ $runtime·newosproc0(SB), AX CALL AX restore: - MOVQ 0x18(SP), BX - MOVQ 0x20(SP), BP - MOVQ 0x28(SP), R12 - MOVQ 0x30(SP), R13 - MOVQ 0x38(SP), R14 - MOVQ 0x40(SP), R15 + MOVQ 0x10(SP), BX + MOVQ 0x18(SP), BP + MOVQ 0x20(SP), R12 + MOVQ 0x28(SP), R13 + MOVQ 0x30(SP), R14 + MOVQ 0x38(SP), R15 RET TEXT _rt0_amd64_linux_lib_go(SB),NOSPLIT,$0 |
