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

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

Issue 5989057: code review 5989057: runtime: cgo support for Linux/ARM (Closed)
Patch Set: diff -r f91c7d6a195b https://code.google.com/p/go/ Created 12 years, 10 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/signal_linux_arm.c ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pkg/runtime/sys_linux_arm.s
===================================================================
--- a/src/pkg/runtime/sys_linux_arm.s
+++ b/src/pkg/runtime/sys_linux_arm.s
@@ -293,6 +293,14 @@
RET
TEXT runtime·sigtramp(SB),7,$24
+ // this might be called in external code context,
+ // where g and m are not set.
+ // first save R0, becuase cgo_load_gm will clobber it
+ MOVW R0, 4(R13)
+ MOVW cgo_load_gm(SB), R0
+ CMP $0, R0
+ BL.NE (R0)
+
// save g
MOVW g, R3
MOVW g, 20(R13)
@@ -301,7 +309,7 @@
MOVW m_gsignal(m), g
// copy arguments for call to sighandler
- MOVW R0, 4(R13)
+ // R0 is already saved above
MOVW R1, 8(R13)
MOVW R2, 12(R13)
MOVW R3, 16(R13)
« no previous file with comments | « src/pkg/runtime/signal_linux_arm.c ('k') | no next file » | no next file with comments »

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