mirror of
https://github.com/golang/go
synced 2024-10-05 16:41:21 -06:00
[dev.power64] cmd/9g, cmd/gc, cmd/ld: fix build.
1. disable nonsplit stack overflow check 2. disable OLROT recognition 3. emit correct instructions for adding offsets to an address LGTM=rsc R=rsc, iant CC=golang-codereviews https://golang.org/cl/123310043
This commit is contained in:
parent
860f941e7f
commit
3e4dfdad34
@ -788,6 +788,18 @@ agenr(Node *n, Node *a, Node *res)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
ginsadd(int as, vlong off, Node *dst)
|
||||
{
|
||||
Node n1;
|
||||
|
||||
regalloc(&n1, types[tptr], dst);
|
||||
gmove(dst, &n1);
|
||||
ginscon(as, off, &n1);
|
||||
gmove(&n1, dst);
|
||||
regfree(&n1);
|
||||
}
|
||||
|
||||
/*
|
||||
* generate:
|
||||
* res = &n;
|
||||
@ -901,7 +913,7 @@ agen(Node *n, Node *res)
|
||||
}
|
||||
cgen(n->heapaddr, res);
|
||||
if(n->xoffset != 0) {
|
||||
ginscon(optoas(OADD, types[tptr]), n->xoffset, res);
|
||||
ginsadd(optoas(OADD, types[tptr]), n->xoffset, res);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -913,7 +925,7 @@ agen(Node *n, Node *res)
|
||||
case ODOT:
|
||||
agen(nl, res);
|
||||
if(n->xoffset != 0) {
|
||||
ginscon(optoas(OADD, types[tptr]), n->xoffset, res);
|
||||
ginsadd(optoas(OADD, types[tptr]), n->xoffset, res);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -921,7 +933,7 @@ agen(Node *n, Node *res)
|
||||
cgen(nl, res);
|
||||
cgen_checknil(res);
|
||||
if(n->xoffset != 0) {
|
||||
ginscon(optoas(OADD, types[tptr]), n->xoffset, res);
|
||||
ginsadd(optoas(OADD, types[tptr]), n->xoffset, res);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -3218,6 +3218,9 @@ walkrotate(Node **np)
|
||||
Node *l, *r;
|
||||
Node *n;
|
||||
|
||||
if(thechar == '9')
|
||||
return;
|
||||
|
||||
n = *np;
|
||||
|
||||
// Want << | >> or >> | << or << ^ >> or >> ^ << on unsigned value.
|
||||
|
@ -1046,6 +1046,9 @@ dostkcheck(void)
|
||||
Chain ch;
|
||||
LSym *s;
|
||||
|
||||
if(thechar == '9')
|
||||
return;
|
||||
|
||||
morestack = linklookup(ctxt, "runtime.morestack", 0);
|
||||
newstack = linklookup(ctxt, "runtime.newstack", 0);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user