ref: c2288eaf1b9e3a8d824ce361bfa76b60cdba36fe
parent: 7fc6512280437c7d8487476d48aedd8d7d135434
author: Ori Bernstein <[email protected]>
date: Sun Sep 7 16:57:17 EDT 2014
Apply the src/dest offsets when blitting bytes. When passing values on the stack, we were clobbering args. This is bad. This meant subtle corruption.
--- a/6/isel.c
+++ b/6/isel.c
@@ -394,8 +394,8 @@
tmp = locreg(ModeB);
i *= Ptrsz; /* we counted in Ptrsz chunks; now we need a byte offset */
for (; i < sz; i++) {
- src = locmem(i, sp, NULL, ModeB);
- dst = locmem(i, dp, NULL, ModeB);
+ src = locmem(i + srcoff, sp, NULL, ModeB);
+ dst = locmem(i + dstoff, dp, NULL, ModeB);
g(s, Imov, src, tmp, NULL);
g(s, Imov, tmp, dst, NULL);
}