From 4a7074371270d63a92e90366b2e9478048340a2e Mon Sep 17 00:00:00 2001 From: Jiajie Chen Date: Thu, 14 Dec 2023 13:22:55 +0800 Subject: [PATCH] Add 3C5000 special result --- code/xvshuf_b.h | 4 +++- code/xvshuf_d.h | 4 +++- code/xvshuf_h.h | 4 +++- code/xvshuf_w.h | 4 +++- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/code/xvshuf_b.h b/code/xvshuf_b.h index 18c7920c..b283e8fd 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 62b44296..78ba6211 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 a43cdc3b..861911d9 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 d3f27a59..a7f35ead 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)];