Commit 03bbfe67 authored by Kai Backman's avatar Kai Backman

fix off by 4 in newproc arg copying.

R=rsc
APPROVED=rsc
DELTA=4  (0 added, 0 deleted, 4 changed)
OCL=36001
CL=36004
parent 34e80752
......@@ -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
......
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