aboutsummaryrefslogtreecommitdiff
path: root/src/runtime
diff options
context:
space:
mode:
authorMichael Hudson-Doyle <michael.hudson@canonical.com>2015-09-02 22:25:57 +1200
committerMichael Hudson-Doyle <michael.hudson@canonical.com>2015-11-08 21:46:17 +0000
commit1b4d28f8cf48f6d8cf346adc1d3cbd0ede338558 (patch)
tree60f27525566f5e3155f62fc1f318aee6b539dc19 /src/runtime
parent3953c1d84f2671615e842cb402e1aec6667530aa (diff)
downloadgo-1b4d28f8cf48f6d8cf346adc1d3cbd0ede338558.tar.xz
cmd/link, runtime: arm implementation of addmoduledata
Change-Id: I3975e10c2445e23c2798a7203a877ff2de3427c7 Reviewed-on: https://go-review.googlesource.com/14189 Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/runtime')
-rw-r--r--src/runtime/asm_arm.s11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/runtime/asm_arm.s b/src/runtime/asm_arm.s
index 8472090d8b..62f2a276e7 100644
--- a/src/runtime/asm_arm.s
+++ b/src/runtime/asm_arm.s
@@ -1076,3 +1076,14 @@ TEXT runtime·usplitR0(SB),NOSPLIT,$0
TEXT runtime·sigreturn(SB),NOSPLIT,$0-4
RET
+
+#ifndef GOOS_nacl
+// This is called from .init_array and follows the platform, not Go, ABI.
+TEXT runtime·addmoduledata(SB),NOSPLIT,$0-4
+ MOVW R9, saver9-4(SP) // The access to global variables below implicitly uses R9, which is callee-save
+ MOVW runtime·lastmoduledatap(SB), R1
+ MOVW R0, moduledata_next(R1)
+ MOVW R0, runtime·lastmoduledatap(SB)
+ MOVW saver9-4(SP), R9
+ RET
+#endif