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
28429aaa
Commit
28429aaa
authored
Jun 05, 2008
by
Ken Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
goos and goarch
SVN=121346
parent
2b77d87f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
86 additions
and
0 deletions
+86
-0
rt0_amd64_darwin.s
src/runtime/rt0_amd64_darwin.s
+86
-0
No files found.
src/runtime/rt0_amd64_darwin.s
0 → 100644
View file @
28429aaa
// Copyright 2009 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_amd64_darwin(SB),1,$-8
PUSHQ $0
MOVQ SP, BP
ANDQ $~15, SP
MOVQ 8(BP), DI
LEAQ 16(BP), SI
MOVL DI, DX
ADDL $1, DX
SHLL $3, DX
ADDQ SI, DX
MOVQ DX, CX
CMPQ (CX), $0
JEQ done
loop:
ADDQ $8, CX
CMPQ (CX), $0
JNE loop
done:
ADDQ $8, CX
CALL check(SB)
CALL main_main(SB)
CALL sys_exit(SB)
CALL notok(SB)
POPQ AX
RET
TEXT FLUSH(SB),1,$-8
RET
TEXT sys_exit(SB),1,$-8
MOVL 8(SP), DI // arg 1 exit status
MOVL $(0x2000000+1), AX
SYSCALL
JCC 2(PC)
CALL notok(SB)
RET
TEXT sys_write(SB),1,$-8
MOVL 8(SP), DI // arg 1 fid
MOVQ 16(SP), SI // arg 2 buf
MOVL 24(SP), DX // arg 3 count
MOVL $(0x2000000+4), AX // syscall entry
SYSCALL
JCC 2(PC)
CALL notok(SB)
RET
TEXT sys_breakpoint(SB),1,$-8
BYTE $0xcc
RET
TEXT sys_mmap(SB),1,$-8
MOVQ 8(SP), DI // arg 1 addr
MOVL 16(SP), SI // arg 2 len
MOVL 20(SP), DX // arg 3 prot
MOVL 24(SP), R10 // arg 4 flags
MOVL 28(SP), R8 // arg 5 fid
MOVL 32(SP), R9 // arg 6 offset
MOVL $(0x2000000+197), AX // syscall entry
SYSCALL
JCC 2(PC)
CALL notok(SB)
RET
TEXT notok(SB),1,$-8
MOVL $0xf1, BP
MOVQ BP, (BP)
RET
TEXT sys_memclr(SB),1,$-8
MOVQ 8(SP), DI // arg 1 addr
MOVL 16(SP), CX // arg 2 count
ADDL $7, CX
SHRL $3, CX
MOVQ $0, AX
CLD
REP
STOSQ
RET
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