diff options
| author | Russ Cox <rsc@golang.org> | 2014-09-07 07:23:18 -0400 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2014-09-07 07:23:18 -0400 |
| commit | 8a7597fd7a28cd408852e227661044b31d525032 (patch) | |
| tree | 7759a3c1a4b1b171eb69ed25e214443eb6d4632c /src/liblink | |
| parent | 59dd20f4d3d3614edf665d79c1f4fa5f6f30d057 (diff) | |
| download | go-8a7597fd7a28cd408852e227661044b31d525032.tar.xz | |
runtime: fix nacl/amd64p32 build
Update #8675
Fixes nacl/amd64p32 build.
TBR=khr
CC=golang-codereviews
https://golang.org/cl/141140045
Diffstat (limited to 'src/liblink')
| -rw-r--r-- | src/liblink/obj6.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/liblink/obj6.c b/src/liblink/obj6.c index c6b8e0964e..3c62470be9 100644 --- a/src/liblink/obj6.c +++ b/src/liblink/obj6.c @@ -483,11 +483,19 @@ addstacksplit(Link *ctxt, LSym *cursym) p->from.type = D_INDIR+D_CX; p->from.offset = 2*ctxt->arch->ptrsize; // G.panic p->to.type = D_BX; + if(ctxt->headtype == Hnacl) { + p->as = AMOVL; + p->from.type = D_INDIR+D_R15; + p->from.scale = 1; + p->from.index = D_CX; + } p = appendp(ctxt, p); p->as = ATESTQ; p->from.type = D_BX; p->to.type = D_BX; + if(ctxt->headtype == Hnacl) + p->as = ATESTL; p = appendp(ctxt, p); p->as = AJEQ; @@ -499,12 +507,20 @@ addstacksplit(Link *ctxt, LSym *cursym) p->from.type = D_INDIR+D_SP; p->from.offset = autoffset+8; p->to.type = D_DI; + if(ctxt->headtype == Hnacl) + p->as = ALEAL; p = appendp(ctxt, p); p->as = ACMPQ; p->from.type = D_INDIR+D_BX; p->from.offset = 0; // Panic.argp p->to.type = D_DI; + if(ctxt->headtype == Hnacl) { + p->as = ACMPL; + p->from.type = D_INDIR+D_R15; + p->from.scale = 1; + p->from.index = D_BX; + } p = appendp(ctxt, p); p->as = AJNE; @@ -516,6 +532,12 @@ addstacksplit(Link *ctxt, LSym *cursym) p->from.type = D_SP; p->to.type = D_INDIR+D_BX; p->to.offset = 0; // Panic.argp + if(ctxt->headtype == Hnacl) { + p->as = AMOVL; + p->to.type = D_INDIR+D_R15; + p->to.scale = 1; + p->to.index = D_BX; + } p = appendp(ctxt, p); p->as = ANOP; |
