mirror of
https://github.com/golang/go
synced 2024-11-19 16:54:44 -07:00
fix off by 4 in newproc arg copying.
R=rsc APPROVED=rsc DELTA=4 (0 added, 0 deleted, 4 changed) OCL=36001 CL=36004
This commit is contained in:
parent
34e8075259
commit
03bbfe6724
@ -133,7 +133,7 @@ ginscall(Node *f, int proc)
|
||||
p = gins(AMOVW, &r, N);
|
||||
p->to.type = D_OREG;
|
||||
p->to.reg = REGSP;
|
||||
p->to.offset = -8;
|
||||
p->to.offset = -12;
|
||||
p->scond |= C_WBIT;
|
||||
|
||||
memset(&n1, 0, sizeof n1);
|
||||
@ -168,7 +168,7 @@ ginscall(Node *f, int proc)
|
||||
p = gins(AMOVW, &r, N);
|
||||
p->to.type = D_OREG;
|
||||
p->to.reg = REGSP;
|
||||
p->to.offset = 8;
|
||||
p->to.offset = 12;
|
||||
p->scond |= C_WBIT;
|
||||
regfree(&r);
|
||||
|
||||
|
@ -91,7 +91,7 @@ TEXT breakpoint(SB),7,$0
|
||||
|
||||
// uintptr gosave(Gobuf*)
|
||||
// save state in Gobuf; setjmp
|
||||
TEXT gosave(SB), 7, $0
|
||||
TEXT gosave(SB), 7, $-4
|
||||
MOVW 0(FP), R0
|
||||
MOVW SP, gobuf_sp(R0)
|
||||
MOVW LR, gobuf_pc(R0)
|
||||
@ -101,7 +101,7 @@ TEXT gosave(SB), 7, $0
|
||||
|
||||
// void gogo(Gobuf*, uintptr)
|
||||
// restore state from Gobuf; longjmp
|
||||
TEXT gogo(SB), 7, $0
|
||||
TEXT gogo(SB), 7, $-4
|
||||
MOVW 0(FP), R1 // gobuf
|
||||
MOVW 4(FP), R0 // return 2nd arg
|
||||
MOVW gobuf_g(R1), g
|
||||
|
Loading…
Reference in New Issue
Block a user