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
a9996d0f
Commit
a9996d0f
authored
Apr 13, 2009
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
runtime nits: variable name and comments
R=r DELTA=10 (0 added, 0 deleted, 10 changed) OCL=27374 CL=27388
parent
e97121a1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
proc.c
src/runtime/proc.c
+10
-10
No files found.
src/runtime/proc.c
View file @
a9996d0f
...
...
@@ -553,18 +553,18 @@ sys·exitsyscall(void)
* stack frame size <= StackSmall:
* CMPQ guard, SP
* JHI 3(PC)
* MOVQ m->morearg, $(
(frame << 32) | argsize
)
* MOVQ m->morearg, $(
argsize << 32
)
* CALL sys.morestack(SB)
*
* stack frame size > StackSmall but < StackBig
* LEAQ (frame-StackSmall)(SP), R0
* CMPQ guard, R0
* JHI 3(PC)
* MOVQ m->morearg, $(
(frame << 32) | argsize
)
* MOVQ m->morearg, $(
argsize << 32
)
* CALL sys.morestack(SB)
*
* stack frame size >= StackBig:
* MOVQ m->morearg, $((
frame << 32) | argsiz
e)
* MOVQ m->morearg, $((
argsize << 32) | fram
e)
* CALL sys.morestack(SB)
*
* the bottom StackGuard - StackSmall bytes are important:
...
...
@@ -605,7 +605,7 @@ void
oldstack
(
void
)
{
Stktop
*
top
;
uint32
siz2
;
uint32
args
;
byte
*
sp
;
uint64
oldsp
,
oldpc
,
oldbase
,
oldguard
;
...
...
@@ -613,13 +613,13 @@ oldstack(void)
top
=
(
Stktop
*
)
m
->
curg
->
stackbase
;
siz2
=
(
top
->
magic
>>
32
)
&
0xffffLL
;
args
=
(
top
->
magic
>>
32
)
&
0xffffLL
;
sp
=
(
byte
*
)
top
;
if
(
siz2
>
0
)
{
siz2
=
(
siz2
+
7
)
&
~
7
;
sp
-=
siz2
;
mcpy
(
top
->
oldsp
+
16
,
sp
,
siz2
);
if
(
args
>
0
)
{
args
=
(
args
+
7
)
&
~
7
;
sp
-=
args
;
mcpy
(
top
->
oldsp
+
2
*
sizeof
(
uintptr
),
sp
,
args
);
}
oldsp
=
(
uint64
)
top
->
oldsp
+
8
;
...
...
@@ -663,7 +663,7 @@ newstack(void)
frame
=
m
->
morearg
&
0xffffffffLL
;
args
=
(
m
->
morearg
>>
32
)
&
0xffffLL
;
// printf("newstack frame=%d args=%d moresp=%p
\n", frame, args,
m->moresp);
// printf("newstack frame=%d args=%d moresp=%p
morepc=%p\n", frame, args, m->moresp, *(uintptr*)
m->moresp);
if
(
frame
<
StackBig
)
frame
=
StackBig
;
...
...
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