You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Previously, when trying to move a region "backwards" with a length that wasn't a multiple of the word size, we'd move the first bytes twice (first byte-by-byte, then as part of the last word), and we'd fail to move `m` bytes from the very end.
Now, when trying to move 15 bytes to `add0` we will write to `add[2,1,0]` (or `add[0,1,2]`), then bump the pointer to `add3` where we'll write `add[f-c, b-8, 7-3]` (or `addr[3-7, 8-b, c-f]`) a word at a time.
Demonstrating, once again, that it's better to run some examples when writing this kind of code: by hand, if necessary. I'm not sure how I convinced myself the pointer shouldn't advance when we're copying backwards, but there it was.
0 commit comments