diff --git a/src/cmd/6l/pass.c b/src/cmd/6l/pass.c index d207e748320..115aee6946f 100644 --- a/src/cmd/6l/pass.c +++ b/src/cmd/6l/pass.c @@ -716,6 +716,11 @@ dostkoff(void) p->as = AINT; p->from.type = D_CONST; p->from.offset = 3; + + p = appendp(p); + p->as = ANOP; + q1->pcond = p; + q1 = P; } if(autoffset < StackBig) { // do we need to call morestack? @@ -725,10 +730,6 @@ dostkoff(void) p->as = ACMPQ; p->from.type = D_SP; p->to.type = D_INDIR+D_CX; - if(q1) { - q1->pcond = p; - q1 = P; - } } else { // large stack p = appendp(p); @@ -736,10 +737,6 @@ dostkoff(void) p->from.type = D_INDIR+D_SP; p->from.offset = -(autoffset-StackSmall); p->to.type = D_AX; - if(q1) { - q1->pcond = p; - q1 = P; - } p = appendp(p); p->as = ACMPQ; @@ -769,20 +766,12 @@ dostkoff(void) p->to.type = D_BRANCH; p->pcond = pmorestack[0]; p->to.sym = symmorestack[0]; - if(q1) { - q1->pcond = p; - q1 = P; - } } else if(moreconst1 != 0 && moreconst2 == 0) { p->as = AMOVL; p->from.type = D_CONST; p->from.offset = moreconst1; p->to.type = D_AX; - if(q1) { - q1->pcond = p; - q1 = P; - } p = appendp(p); p->as = ACALL; @@ -796,20 +785,12 @@ dostkoff(void) p->to.type = D_BRANCH; p->pcond = pmorestack[i]; p->to.sym = symmorestack[i]; - if(q1) { - q1->pcond = p; - q1 = P; - } } else if(moreconst1 == 0 && moreconst2 != 0) { p->as = AMOVL; p->from.type = D_CONST; p->from.offset = moreconst2; p->to.type = D_AX; - if(q1) { - q1->pcond = p; - q1 = P; - } p = appendp(p); p->as = ACALL; @@ -822,10 +803,6 @@ dostkoff(void) p->from.offset = (uint64)moreconst2 << 32; p->from.offset |= moreconst1; p->to.type = D_AX; - if(q1) { - q1->pcond = p; - q1 = P; - } p = appendp(p); p->as = ACALL; diff --git a/src/cmd/8l/pass.c b/src/cmd/8l/pass.c index f59ccdb61e5..f55e9a02d81 100644 --- a/src/cmd/8l/pass.c +++ b/src/cmd/8l/pass.c @@ -701,6 +701,10 @@ dostkoff(void) p->as = AINT; p->from.type = D_CONST; p->from.offset = 3; + + p = appendp(p); + p->as = ANOP; + q1->pcond = p; } if(autoffset < StackBig) { // do we need to call morestack @@ -710,10 +714,6 @@ dostkoff(void) p->as = ACMPL; p->from.type = D_SP; p->to.type = D_INDIR+D_CX; - if(q1) { - q1->pcond = p; - q1 = P; - } } else { // large stack p = appendp(p); @@ -721,10 +721,6 @@ dostkoff(void) p->from.type = D_INDIR+D_SP; p->from.offset = -(autoffset-StackSmall); p->to.type = D_AX; - if(q1) { - q1->pcond = p; - q1 = P; - } p = appendp(p); p->as = ACMPL;