ref: dc1c40487c001a71917a25627c2d9e14891f401b
parent: c7981a245e36b9053daac1f6e0f7e23676efa9bb
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);
}