aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/rt0_linux_mipsx.s
diff options
context:
space:
mode:
authorVladimir Stefanovic <vladimir.stefanovic@imgtec.com>2016-12-13 21:56:58 +0100
committerIan Lance Taylor <iant@golang.org>2016-12-14 23:52:33 +0000
commitb909d011520700149b72d556837f68069d2d372a (patch)
treea8ba15095ca31f73b66bdc96c948cc266022c81f /src/runtime/rt0_linux_mipsx.s
parenta3b670e3333ca0f677a82321d3ad173e01e973a5 (diff)
downloadgo-b909d011520700149b72d556837f68069d2d372a.tar.gz
go-b909d011520700149b72d556837f68069d2d372a.zip
runtime: add cgo support for GOARCH=mips{,le}
Change-Id: Ib425ead7b340672837d3cb983bd785488706bd6d Reviewed-on: https://go-review.googlesource.com/34314 Reviewed-by: Cherry Zhang <cherryyz@google.com> Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/runtime/rt0_linux_mipsx.s')
-rw-r--r--src/runtime/rt0_linux_mipsx.s9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/runtime/rt0_linux_mipsx.s b/src/runtime/rt0_linux_mipsx.s
index 5e8c5c3161..9a2e561246 100644
--- a/src/runtime/rt0_linux_mipsx.s
+++ b/src/runtime/rt0_linux_mipsx.s
@@ -18,10 +18,11 @@ TEXT _main<>(SB),NOSPLIT,$-4
// argv as argc string pointers followed by a NULL, envv as a
// sequence of string pointers followed by a NULL, and auxv.
// There is no TLS base pointer.
- MOVW 0(R29), R1 // argc
- ADD $4, R29, R2 // argv
+ MOVW 0(R29), R4 // argc
+ ADD $4, R29, R5 // argv
JMP main(SB)
TEXT main(SB),NOSPLIT,$-4
- MOVW $runtime·rt0_go(SB), R4
- JMP (R4)
+ // In external linking, libc jumps to main with argc in R4, argv in R5
+ MOVW $runtime·rt0_go(SB), R1
+ JMP (R1)