diff options
Diffstat (limited to 'src/cmd/5l/noop.c')
-rw-r--r-- | src/cmd/5l/noop.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/cmd/5l/noop.c b/src/cmd/5l/noop.c index 5def0d3f1..a9439c27a 100644 --- a/src/cmd/5l/noop.c +++ b/src/cmd/5l/noop.c @@ -330,23 +330,23 @@ noops(void) p->from.reg = 1; p->reg = 2; } - + // MOVW.LO $autosize, R1 p = appendp(p); p->as = AMOVW; p->scond = C_SCOND_LO; p->from.type = D_CONST; - p->from.offset = 0; + /* 160 comes from 3 calls (3*8) 4 safes (4*8) and 104 guard */ + p->from.offset = autosize+160; p->to.type = D_REG; p->to.reg = 1; - // MOVW.LO $args +4, R2 - // also need to store the extra 4 bytes. + // MOVW.LO $args, R2 p = appendp(p); p->as = AMOVW; p->scond = C_SCOND_LO; p->from.type = D_CONST; - p->from.offset = ((cursym->text->to.offset2 + 3) & ~3) + 4; + p->from.offset = (cursym->text->to.offset2 + 3) & ~3; p->to.type = D_REG; p->to.reg = 2; @@ -391,12 +391,12 @@ noops(void) p->to.type = D_REG; p->to.reg = 1; - // MOVW $args +4, R2 + // MOVW $args, R2 // also need to store the extra 4 bytes. p = appendp(p); p->as = AMOVW; p->from.type = D_CONST; - p->from.offset = ((cursym->text->to.offset2 + 3) & ~3) + 4; + p->from.offset = (cursym->text->to.offset2 + 3) & ~3; p->to.type = D_REG; p->to.reg = 2; |