summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2014-11-21 15:58:01 -0500
committerAustin Clements <austin@google.com>2014-11-21 15:58:01 -0500
commit5454e9564f4af36e346075d667bd39a5aae2e5a8 (patch)
tree072983f3a391cbd95d9d44ba3a0805be367503e7
parentd86d3f8514c0c074dfb931b6097f8d74d83cefb1 (diff)
downloadgo-5454e9564f4af36e346075d667bd39a5aae2e5a8.tar.gz
[dev.cc] 9g: correct bad proginfo for ADUFFZERO and ADUFFCOPY
LGTM=rsc R=rsc, dave CC=golang-codereviews https://codereview.appspot.com/176130044
-rw-r--r--src/cmd/9g/prog.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/cmd/9g/prog.c b/src/cmd/9g/prog.c
index e3e50f28a..51c132d18 100644
--- a/src/cmd/9g/prog.c
+++ b/src/cmd/9g/prog.c
@@ -134,11 +134,12 @@ proginfo(ProgInfo *info, Prog *p)
}
if(p->as == ADUFFZERO) {
- info->reguse |= RtoB(0) | RtoB(2);
- info->regset |= RtoB(2);
+ info->reguse |= (1<<D_R0) | RtoB(3);
+ info->regset |= RtoB(3);
}
if(p->as == ADUFFCOPY) {
- info->reguse |= RtoB(0) | RtoB(2) | RtoB(3);
- info->regset |= RtoB(2) | RtoB(3);
+ // TODO(austin) Revisit when duffcopy is implemented
+ info->reguse |= RtoB(3) | RtoB(4) | RtoB(5);
+ info->regset |= RtoB(3) | RtoB(4);
}
}