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_arm.s | |
parent | 3f91a017f8f67cb9a744cf5d0a8b5db34a95808d (diff) | |
download | go-ca9128f18fe75878ba2d5e0df09ae755c085f72a.tar.gz go-ca9128f18fe75878ba2d5e0df09ae755c085f72a.zip |
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_arm.s')
-rw-r--r-- | src/runtime/rt0_linux_arm.s | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/src/runtime/rt0_linux_arm.s b/src/runtime/rt0_linux_arm.s index 878a6dd194..b71a3f9267 100644 --- a/src/runtime/rt0_linux_arm.s +++ b/src/runtime/rt0_linux_arm.s @@ -12,15 +12,15 @@ TEXT _rt0_arm_linux(SB),NOSPLIT,$-4 // When building with -buildmode=c-shared, this symbol is called when the shared // library is loaded. -TEXT _rt0_arm_linux_lib(SB),NOSPLIT,$40 +TEXT _rt0_arm_linux_lib(SB),NOSPLIT,$32 // Preserve callee-save registers. Raspberry Pi's dlopen(), for example, // actually cares that R11 is preserved. - MOVW R4, 16(R13) - MOVW R5, 20(R13) - MOVW R6, 24(R13) - MOVW R7, 28(R13) - MOVW R8, 32(R13) - MOVW R11, 36(R13) + MOVW R4, 12(R13) + MOVW R5, 16(R13) + MOVW R6, 20(R13) + MOVW R7, 24(R13) + MOVW R8, 28(R13) + MOVW R11, 32(R13) // Save argc/argv. MOVW R0, _rt0_arm_linux_lib_argc<>(SB) @@ -37,19 +37,17 @@ TEXT _rt0_arm_linux_lib(SB),NOSPLIT,$40 nocgo: MOVW $0x800000, R0 // stacksize = 8192KB MOVW $_rt0_arm_linux_lib_go<>(SB), R1 // fn - MOVW $0, R2 // fnarg MOVW R0, 4(R13) MOVW R1, 8(R13) - MOVW R2, 12(R13) BL runtime·newosproc0(SB) rr: // Restore callee-save registers and return. - MOVW 16(R13), R4 - MOVW 20(R13), R5 - MOVW 24(R13), R6 - MOVW 28(R13), R7 - MOVW 32(R13), R8 - MOVW 36(R13), R11 + MOVW 12(R13), R4 + MOVW 16(R13), R5 + MOVW 20(R13), R6 + MOVW 24(R13), R7 + MOVW 28(R13), R8 + MOVW 32(R13), R11 RET TEXT _rt0_arm_linux_lib_go<>(SB),NOSPLIT,$8 |