Things the optimizer does not catch

This commit is contained in:
dcodeIO
2017-12-08 16:31:42 +01:00
parent da672e2ca6
commit d6b94d4c33
3 changed files with 6 additions and 15 deletions

View File

@ -4,7 +4,7 @@ export function memcpy(dest: usize, src: usize, n: usize): usize {
let w: u32, x: u32;
// copy 1 byte each until src is aligned to 4 bytes
while (n != 0 && s % 4 != 0) {
while (n && s % 4) {
store<u8>(d++, load<u8>(s++));
n--;
}