Skip to content

Commit

Permalink
Add 3C5000 special result
Browse files Browse the repository at this point in the history
  • Loading branch information
jiegec committed Dec 14, 2023
1 parent 16089ab commit 4a70743
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
4 changes: 3 additions & 1 deletion code/xvshuf_b.h
Original file line number Diff line number Diff line change
@@ -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)];
Expand Down
4 changes: 3 additions & 1 deletion code/xvshuf_d.h
Original file line number Diff line number Diff line change
@@ -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)];
Expand Down
4 changes: 3 additions & 1 deletion code/xvshuf_h.h
Original file line number Diff line number Diff line change
@@ -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)];
Expand Down
4 changes: 3 additions & 1 deletion code/xvshuf_w.h
Original file line number Diff line number Diff line change
@@ -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)];
Expand Down

0 comments on commit 4a70743

Please sign in to comment.