ref: 366eeda638702daf6f11b5594c301d691853fcec
parent: efb73d93688493a11f66205ebe7fd00e20d32b01
author: Ori Bernstein <ori@eigenstate.org>
date: Tue Dec 23 05:56:25 EST 2014
Plan 9 always wants a scale in memrefs.
--- a/6/genp9.c
+++ b/6/genp9.c
@@ -105,8 +105,7 @@
if (l->mem.idx) {
fprintf(fd, "(");
locprint(fd, l->mem.idx, 'r');
- if (l->mem.scale > 1)
- fprintf(fd, "*%d", l->mem.scale);
+ fprintf(fd, "*%d", l->mem.scale);
fprintf(fd, ")");
}
}
--- a/6/locs.c
+++ b/6/locs.c
@@ -146,7 +146,7 @@
l->mem.constdisp = disp;
l->mem.base = base;
l->mem.idx = idx;
- l->mem.scale = 0;
+ l->mem.scale = 1;
return l;
}
@@ -169,7 +169,7 @@
l->mem.lbldisp = strdup(disp);
l->mem.base = base;
l->mem.idx = idx;
- l->mem.scale = 0;
+ l->mem.scale = 1;
return l;
}