Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
ebd1eef4
Commit
ebd1eef4
authored
Sep 22, 2008
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
implement spec: when main.main returns, the program exits
R=r DELTA=9 (7 added, 2 deleted, 0 changed) OCL=15628 CL=15643
parent
fb40f88c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
rt0_amd64.s
src/runtime/rt0_amd64.s
+7
-2
No files found.
src/runtime/rt0_amd64.s
View file @
ebd1eef4
...
...
@@ -37,13 +37,14 @@ TEXT _rt0_amd64(SB),7,$-8
CALL schedinit(SB)
// create a new goroutine to start program
PUSHQ $mainstart(SB) // entry
PUSHQ $16 // arg size
CALL sys·newproc(SB)
CALL mstart(SB)
POPQ AX
POPQ AX
// start this M
CALL mstart(SB)
CALL notok(SB) // never returns
RET
...
...
@@ -52,6 +53,10 @@ TEXT mainstart(SB),7,$0
CALL main·init_function(SB)
CALL initdone(SB)
CALL main·main(SB)
PUSHQ $0
CALL sys·exit(SB)
POPQ AX
CALL notok(SB)
RET
TEXT sys·breakpoint(SB),7,$0
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment