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

Unified Diff: src/pkg/runtime/plan9/386/rt0.s

Issue 2273041: code review 2273041: Initial Plan9 runtime support for 386. (Closed)
Patch Set: code review 2273041: Initial Plan9 runtime support for 386. Created 13 years, 5 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/plan9/386/defs.h ('k') | src/pkg/runtime/plan9/386/signal.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pkg/runtime/plan9/386/rt0.s
===================================================================
new file mode 100644
--- /dev/null
+++ b/src/pkg/runtime/plan9/386/rt0.s
@@ -0,0 +1,32 @@
+// Copyright 2010 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.
+
+TEXT _rt0_386_plan9(SB),7, $0
+ MOVL AX, _tos(SB)
+
+ // move arguments down to make room for
+ // m and g at top of stack, right before Tos.
+ MOVL SP, SI
+ SUBL $8, SP
+ MOVL SP, DI
+
+ MOVL AX, CX
+ SUBL SI, CX
+ CLD
+ REP; MOVSB
+
+ // adjust argv
+ SUBL SI, DI
+ MOVL newargc+0(SP), CX
+ LEAL newargv+4(SP), BP
+argv_fix:
+ ADDL DI, 0(BP)
+ ADDL $4, BP
+ LOOP argv_fix
+
+ JMP _rt0_386(SB)
+
+DATA isplan9+0(SB)/4, $1
+GLOBL isplan9(SB), $4
+GLOBL _tos(SB), $4
« no previous file with comments | « src/pkg/runtime/plan9/386/defs.h ('k') | src/pkg/runtime/plan9/386/signal.c » ('j') | no next file with comments »

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