diff --git a/code/xvshuf_b.h b/code/xvshuf_b.h index 18c7920..b283e8f 100644 --- a/code/xvshuf_b.h +++ b/code/xvshuf_b.h @@ -1,5 +1,7 @@ for (int i = 0; i < 32; i++) { - if ((c.byte[i] % 32) < 16) { + if ((c.byte[i] % 256) >= 64 && MACHINE_3C5000) { + dst.byte[i] = 0; + } else if ((c.byte[i] % 32) < 16) { dst.byte[i] = b.byte[(c.byte[i] % 32) + ((i >= 16) ? 16 : 0)]; } else { dst.byte[i] = a.byte[(c.byte[i] % 32) + ((i >= 16) ? 0 : -16)]; diff --git a/code/xvshuf_d.h b/code/xvshuf_d.h index 62b4429..78ba621 100644 --- a/code/xvshuf_d.h +++ b/code/xvshuf_d.h @@ -1,5 +1,7 @@ for (int i = 0; i < 4; i++) { - if ((a.dword[i] % 4) < 2) { + if ((a.dword[i] % 256) >= 64 && MACHINE_3C5000) { + dst.dword[i] = 0; + } else if ((a.dword[i] % 4) < 2) { dst.dword[i] = c.dword[(a.dword[i] % 4) + ((i >= 2) ? 2 : 0)]; } else { dst.dword[i] = b.dword[(a.dword[i] % 4) + ((i >= 2) ? 0 : -2)]; diff --git a/code/xvshuf_h.h b/code/xvshuf_h.h index a43cdc3..861911d 100644 --- a/code/xvshuf_h.h +++ b/code/xvshuf_h.h @@ -1,5 +1,7 @@ for (int i = 0; i < 16; i++) { - if ((a.half[i] % 16) < 8) { + if ((a.half[i] % 256) >= 64 && MACHINE_3C5000) { + dst.half[i] = 0; + } else if ((a.half[i] % 16) < 8) { dst.half[i] = c.half[(a.half[i] % 16) + ((i >= 8) ? 8 : 0)]; } else { dst.half[i] = b.half[(a.half[i] % 16) + ((i >= 8) ? 0 : -8)]; diff --git a/code/xvshuf_w.h b/code/xvshuf_w.h index d3f27a5..a7f35ea 100644 --- a/code/xvshuf_w.h +++ b/code/xvshuf_w.h @@ -1,5 +1,7 @@ for (int i = 0; i < 8; i++) { - if ((a.word[i] % 8) < 4) { + if ((a.word[i] % 256) >= 64 && MACHINE_3C5000) { + dst.word[i] = 0; + } else if ((a.word[i] % 8) < 4) { dst.word[i] = c.word[(a.word[i] % 8) + ((i >= 4) ? 4 : 0)]; } else { dst.word[i] = b.word[(a.word[i] % 8) + ((i >= 4) ? 0 : -4)];