diff options
author | Shenghou Ma <minux@golang.org> | 2014-08-12 21:22:27 -0400 |
---|---|---|
committer | Shenghou Ma <minux@golang.org> | 2014-08-12 21:22:27 -0400 |
commit | ee6a4ba096d22a0f44f636278e47eb62a6fb8821 (patch) | |
tree | 5575a44abcd7e496e1eb2625b383714a318bcafa /src/cmd | |
parent | aa440488c960620581115b2a708fb41105e596c2 (diff) | |
download | go-ee6a4ba096d22a0f44f636278e47eb62a6fb8821.tar.gz |
[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://codereview.appspot.com/123310043
Diffstat (limited to 'src/cmd')
-rw-r--r-- | src/cmd/9g/cgen.c | 18 | ||||
-rw-r--r-- | src/cmd/gc/walk.c | 3 | ||||
-rw-r--r-- | src/cmd/ld/lib.c | 3 |
3 files changed, 21 insertions, 3 deletions
diff --git a/src/cmd/9g/cgen.c b/src/cmd/9g/cgen.c index af87b3a07..3644ebf8f 100644 --- a/src/cmd/9g/cgen.c +++ b/src/cmd/9g/cgen.c @@ -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; } diff --git a/src/cmd/gc/walk.c b/src/cmd/gc/walk.c index be929e99e..cb1873f85 100644 --- a/src/cmd/gc/walk.c +++ b/src/cmd/gc/walk.c @@ -3217,6 +3217,9 @@ walkrotate(Node **np) int w, sl, sr, s; Node *l, *r; Node *n; + + if(thechar == '9') + return; n = *np; diff --git a/src/cmd/ld/lib.c b/src/cmd/ld/lib.c index bdba21747..b4134da36 100644 --- a/src/cmd/ld/lib.c +++ b/src/cmd/ld/lib.c @@ -1045,6 +1045,9 @@ dostkcheck(void) { Chain ch; LSym *s; + + if(thechar == '9') + return; morestack = linklookup(ctxt, "runtime.morestack", 0); newstack = linklookup(ctxt, "runtime.newstack", 0); |