]> Cypherpunks repositories - gostls13.git/commitdiff
runtime/cgo: fix arm build, re-enable test
authorRuss Cox <rsc@golang.org>
Fri, 1 Mar 2013 21:24:23 +0000 (16:24 -0500)
committerRuss Cox <rsc@golang.org>
Fri, 1 Mar 2013 21:24:23 +0000 (16:24 -0500)
Fixes #4961.

R=golang-dev, r, minux.ma
CC=golang-dev
https://golang.org/cl/7443048

src/pkg/runtime/cgo/asm_arm.s
src/pkg/runtime/cgo/cgo_arm.c [new file with mode: 0644]
src/run.bash

index 40f030084122ed39020b29a813a9cba03826a163..a6ea0dc0781d0c24e05acd2af1c9f640d40e1819 100644 (file)
@@ -19,5 +19,5 @@ TEXT crosscall2(SB),7,$-4
        MOVW    _cgo_load_gm(SB), R0
        BL      (R0)
        MOVW    PC, R14
-       MOVW    -4(R13), PC
+       MOVW    0(R13), PC
        MOVM.IAW        (R13), [R0, R1, R2, R4, R5, R6, R7, R8, R9, R10, R11, R12, PC]
diff --git a/src/pkg/runtime/cgo/cgo_arm.c b/src/pkg/runtime/cgo/cgo_arm.c
new file mode 100644 (file)
index 0000000..d23f53e
--- /dev/null
@@ -0,0 +1,12 @@
+// Copyright 2013 The Go Authors.  All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+#pragma cgo_import_static x_cgo_load_gm
+extern void x_cgo_load_gm(void);
+void (*_cgo_load_gm)(void) = x_cgo_load_gm;
+
+#pragma cgo_import_static x_cgo_save_gm
+extern void x_cgo_save_gm(void);
+void (*_cgo_save_gm)(void) = x_cgo_save_gm;
+
index c5ed919a3b06d35aa3e096d8f23a8f77e6bf0df3..a026b459ce3c36cafd7024244e16d39a1375dfd9 100755 (executable)
@@ -75,7 +75,6 @@ go run $GOROOT/test/run.go - .
 
 [ "$CGO_ENABLED" != 1 ] ||
 [ "$GOHOSTOS" == openbsd ] || # issue 4878
-[ "$GOARCH" == arm ] || # issue 4961
 (xcd ../misc/cgo/test
 go test
 ) || exit $?