summaryrefslogtreecommitdiff
path: root/src/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd')
-rw-r--r--src/cmd/5g/ggen.c2
-rw-r--r--src/cmd/5l/noop.c9
2 files changed, 5 insertions, 6 deletions
diff --git a/src/cmd/5g/ggen.c b/src/cmd/5g/ggen.c
index 932b4877c..182d7f147 100644
--- a/src/cmd/5g/ggen.c
+++ b/src/cmd/5g/ggen.c
@@ -172,7 +172,7 @@ ginscall(Node *f, int proc)
p->to.reg = REGSP;
p->to.offset = 8;
- nodconst(&con, types[TINT32], argsize(f->type) + 4);
+ nodconst(&con, types[TINT32], argsize(f->type));
gins(AMOVW, &con, &r);
p = gins(AMOVW, &r, N);
p->to.type = D_OREG;
diff --git a/src/cmd/5l/noop.c b/src/cmd/5l/noop.c
index 5def0d3f1..925984d75 100644
--- a/src/cmd/5l/noop.c
+++ b/src/cmd/5l/noop.c
@@ -340,13 +340,12 @@ noops(void)
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 +390,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;