Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(58)

Unified Diff: src/pkg/runtime/asm_arm.s

Issue 139070043: code review 139070043: cmd/cgo, runtime: write cgo stub wrappers in Go, not C (Closed)
Patch Set: diff -r 36d3d8a7ae548d555044ebd4a146c49b751b9880 https://code.google.com/p/go/ Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pkg/runtime/asm_amd64p32.s ('k') | src/pkg/runtime/cgocall.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pkg/runtime/asm_arm.s
===================================================================
--- a/src/pkg/runtime/asm_arm.s
+++ b/src/pkg/runtime/asm_arm.s
@@ -493,7 +493,15 @@
// Call fn(arg) on the scheduler stack,
// aligned appropriately for the gcc ABI.
// See cgocall.c for more details.
-TEXT runtime·asmcgocall(SB),NOSPLIT,$0-8
+TEXT runtime·asmcgocall(SB),NOSPLIT,$12-8
+ MOVW fn+0(FP), R1
+ MOVW arg+4(FP), R2
+ MOVW R1, 0(R13)
+ MOVW R2, 4(R13)
+ BL runtime·asmcgocall_errno(SB)
+ RET
+
+TEXT runtime·asmcgocall_errno(SB),NOSPLIT,$0-12
MOVW fn+0(FP), R1
MOVW arg+4(FP), R0
MOVW R13, R2
@@ -521,6 +529,7 @@
// Restore registers, g, stack pointer.
MOVW 20(R13), g
MOVW 16(R13), R13
+ MOVW R0, ret+8(FP)
RET
// cgocallback(void (*fn)(void*), void *frame, uintptr framesize)
« no previous file with comments | « src/pkg/runtime/asm_amd64p32.s ('k') | src/pkg/runtime/cgocall.h » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b