Commit a9996d0f authored by Russ Cox's avatar Russ Cox

runtime nits: variable name and comments

R=r
DELTA=10  (0 added, 0 deleted, 10 changed)
OCL=27374
CL=27388
parent e97121a1
...@@ -553,18 +553,18 @@ sys·exitsyscall(void) ...@@ -553,18 +553,18 @@ sys·exitsyscall(void)
* stack frame size <= StackSmall: * stack frame size <= StackSmall:
* CMPQ guard, SP * CMPQ guard, SP
* JHI 3(PC) * JHI 3(PC)
* MOVQ m->morearg, $((frame << 32) | argsize) * MOVQ m->morearg, $(argsize << 32)
* CALL sys.morestack(SB) * CALL sys.morestack(SB)
* *
* stack frame size > StackSmall but < StackBig * stack frame size > StackSmall but < StackBig
* LEAQ (frame-StackSmall)(SP), R0 * LEAQ (frame-StackSmall)(SP), R0
* CMPQ guard, R0 * CMPQ guard, R0
* JHI 3(PC) * JHI 3(PC)
* MOVQ m->morearg, $((frame << 32) | argsize) * MOVQ m->morearg, $(argsize << 32)
* CALL sys.morestack(SB) * CALL sys.morestack(SB)
* *
* stack frame size >= StackBig: * stack frame size >= StackBig:
* MOVQ m->morearg, $((frame << 32) | argsize) * MOVQ m->morearg, $((argsize << 32) | frame)
* CALL sys.morestack(SB) * CALL sys.morestack(SB)
* *
* the bottom StackGuard - StackSmall bytes are important: * the bottom StackGuard - StackSmall bytes are important:
...@@ -605,7 +605,7 @@ void ...@@ -605,7 +605,7 @@ void
oldstack(void) oldstack(void)
{ {
Stktop *top; Stktop *top;
uint32 siz2; uint32 args;
byte *sp; byte *sp;
uint64 oldsp, oldpc, oldbase, oldguard; uint64 oldsp, oldpc, oldbase, oldguard;
...@@ -613,13 +613,13 @@ oldstack(void) ...@@ -613,13 +613,13 @@ oldstack(void)
top = (Stktop*)m->curg->stackbase; top = (Stktop*)m->curg->stackbase;
siz2 = (top->magic>>32) & 0xffffLL; args = (top->magic>>32) & 0xffffLL;
sp = (byte*)top; sp = (byte*)top;
if(siz2 > 0) { if(args > 0) {
siz2 = (siz2+7) & ~7; args = (args+7) & ~7;
sp -= siz2; sp -= args;
mcpy(top->oldsp+16, sp, siz2); mcpy(top->oldsp+2*sizeof(uintptr), sp, args);
} }
oldsp = (uint64)top->oldsp + 8; oldsp = (uint64)top->oldsp + 8;
...@@ -663,7 +663,7 @@ newstack(void) ...@@ -663,7 +663,7 @@ newstack(void)
frame = m->morearg & 0xffffffffLL; frame = m->morearg & 0xffffffffLL;
args = (m->morearg>>32) & 0xffffLL; 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) if(frame < StackBig)
frame = StackBig; frame = StackBig;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment