Commit d97d3718 authored by Josh Bleecher Snyder's avatar Josh Bleecher Snyder

5g, 8g: remove dead code

maxstksize is superfluous and appears to be vestigial. 6g does not use it.

c >= 4 cannot occur; c = w % 4.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/68750043
parent e6863e7d
......@@ -28,7 +28,6 @@ EXTERN Node* panicindex;
EXTERN Node* panicslice;
EXTERN Node* throwreturn;
extern long unmappedzero;
EXTERN int maxstksize;
/*
* gen.c
......
......@@ -22,11 +22,8 @@ defframe(Prog *ptxt)
ptxt->to.offset2 = rnd(curfn->type->argwid, widthptr);
// fill in final stack size
if(stksize > maxstksize)
maxstksize = stksize;
frame = rnd(maxstksize+maxarg, widthptr);
frame = rnd(stksize+maxarg, widthptr);
ptxt->to.offset = frame;
maxstksize = 0;
p = ptxt;
if(stkzerosize > 0) {
......
......@@ -31,7 +31,6 @@ EXTERN Node* panicindex;
EXTERN Node* panicslice;
EXTERN Node* panicdiv;
EXTERN Node* throwreturn;
EXTERN int maxstksize;
extern uint32 unmappedzero;
......
......@@ -21,11 +21,8 @@ defframe(Prog *ptxt)
ptxt->to.offset2 = rnd(curfn->type->argwid, widthptr);
// fill in final stack size
if(stksize > maxstksize)
maxstksize = stksize;
frame = rnd(maxstksize+maxarg, widthptr);
frame = rnd(stksize+maxarg, widthptr);
ptxt->to.offset = frame;
maxstksize = 0;
// insert code to contain ambiguously live variables
// so that garbage collector only sees initialized values
......@@ -137,11 +134,6 @@ clearfat(Node *nl)
q--;
}
if(c >= 4) {
gconreg(AMOVL, c, D_CX);
gins(AREP, N, N); // repeat
gins(ASTOSB, N, N); // STOB AL,*(DI)+
} else
while(c > 0) {
gins(ASTOSB, N, N); // STOB AL,*(DI)+
c--;
......
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