Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
3719aa4d
Commit
3719aa4d
authored
Jun 27, 2008
by
Rob Pike
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update darwin for segmented stacks
SVN=125154
parent
1f6828bc
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
30 deletions
+45
-30
src/runtime/rt0_amd64_darwin.s
src/runtime/rt0_amd64_darwin.s
+44
-29
src/runtime/rt0_amd64_linux.s
src/runtime/rt0_amd64_linux.s
+1
-1
No files found.
src/runtime/rt0_amd64_darwin.s
View file @
3719aa4d
...
...
@@ -3,43 +3,56 @@
//
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
//
argc
LEAQ
16
(
BP
),
SI
//
argv
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
SUBQ
$
16
,
SP
MOVL
DI
,
0
(
SP
)
MOVQ
SI
,
8
(
SP
)
CALL
args
(
SB
)
ADDQ
$
16
,
SP
TEXT
_rt0_amd64_darwin
(
SB
),7,$-8
//
copy
arguments
forward
on
an
even
stack
MOVQ
0
(
SP
),
AX
//
argc
LEAQ
8
(
SP
),
BX
//
argv
ANDQ
$~
7
,
SP
SUBQ
$
32
,
SP
MOVQ
AX
,
16
(
SP
)
MOVQ
BX
,
24
(
SP
)
//
allocate
the
per
-
user
block
LEAQ
peruser
<>(
SB
),
R15
//
dedicated
u
.
register
MOVQ
SP
,
AX
SUBQ
$
4096
,
AX
MOVQ
AX
,
0
(
R15
)
CALL
check
(
SB
)
//
process
the
arguments
MOVL
16
(
SP
),
AX
MOVL
AX
,
0
(
SP
)
MOVQ
24
(
SP
),
AX
MOVQ
AX
,
8
(
SP
)
CALL
args
(
SB
)
CALL
main
·
main
(
SB
)
MOVQ
$
0
,
AX
MOVQ
AX
,
0
(
SP
)
//
exit
status
CALL
sys
·
exit
(
SB
)
CALL
notok
(
SB
)
POPQ
AX
ADDQ
$
32
,
SP
RET
TEXT
_morestack
(
SB
),
7
,
$
0
MOVQ
SP
,
AX
SUBQ
$
1024
,
AX
MOVQ
AX
,
0
(
R15
)
RET
TEXT
FLUSH
(
SB
),7,$-8
RET
TEXT
sys
·
exit
(
SB
),
7
,$-8
TEXT
sys
·
exit
(
SB
),
1
,$-8
MOVL
8
(
SP
),
DI
//
arg
1
exit
status
MOVL
$
(
0x2000000
+
1
),
AX
SYSCALL
...
...
@@ -138,7 +151,9 @@ TEXT sys·memclr(SB),1,$-8
STOSQ
RET
TEXT
sys
·
getcallerpc
+0(
SB
),
0
,$0
TEXT
sys
·
getcallerpc
+0(
SB
),
1
,$0
MOVQ
x
+
0
(
FP
),
AX
MOVQ
-
8
(
AX
),
AX
RET
GLOBL
peruser
<>(
SB
),$64
src/runtime/rt0_amd64_linux.s
View file @
3719aa4d
...
...
@@ -154,7 +154,7 @@ TEXT sys·memclr(SB),1,$-8
STOSQ
RET
TEXT
sys
·
getcallerpc
+0(
SB
),
0
,$0
TEXT
sys
·
getcallerpc
+0(
SB
),
1
,$0
MOVQ
x
+
0
(
FP
),
AX
MOVQ
-
8
(
AX
),
AX
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