diff --git a/code/xvpermi_q.cpp b/code/xvpermi_q.cpp index 2e8eb281..1640e8ea 100644 --- a/code/xvpermi_q.cpp +++ b/code/xvpermi_q.cpp @@ -11,6 +11,8 @@ void test() { XFUZZ2(xvpermi_q, 1); XFUZZ2(xvpermi_q, 2); XFUZZ2(xvpermi_q, 0x10); + XFUZZ2(xvpermi_q, 0x80); + XFUZZ2(xvpermi_q, 0xC0); XFUZZ2(xvpermi_q, 0xF0); XFUZZ2(xvpermi_q, 0xFF); } diff --git a/code/xvpermi_q.h b/code/xvpermi_q.h index 451f8d0c..c4391aef 100644 --- a/code/xvpermi_q.h +++ b/code/xvpermi_q.h @@ -1,3 +1,11 @@ -dst.qword[0] = (imm & 2) ? a.qword[imm & 0x1] : b.qword[imm & 0x1]; -dst.qword[1] = - (imm & 0x20) ? a.qword[(imm >> 4) & 0x1] : b.qword[(imm >> 4) & 0x1]; +if ((imm & 0x4) && MACHINE_3C5000) { + dst.qword[0] = 0; +} else { + dst.qword[0] = (imm & 2) ? a.qword[imm & 0x1] : b.qword[imm & 0x1]; +} +if ((imm & 0x80) && MACHINE_3C5000) { + dst.qword[1] = 0; +} else { + dst.qword[1] = + (imm & 0x20) ? a.qword[(imm >> 4) & 0x1] : b.qword[(imm >> 4) & 0x1]; +} diff --git a/code/xvreplve0_b.cpp b/code/xvreplve0_b.cpp index 62fa86ef..12057e42 100644 --- a/code/xvreplve0_b.cpp +++ b/code/xvreplve0_b.cpp @@ -6,6 +6,4 @@ v256 xvreplve0_b(v256 a) { return dst; } -void test() { - XFUZZ1(xvreplve0_b); -} +void test() { XFUZZ1(xvreplve0_b); } diff --git a/code/xvreplve0_d.cpp b/code/xvreplve0_d.cpp index dfedb5c1..1190f3f7 100644 --- a/code/xvreplve0_d.cpp +++ b/code/xvreplve0_d.cpp @@ -6,6 +6,4 @@ v256 xvreplve0_d(v256 a) { return dst; } -void test() { - XFUZZ1(xvreplve0_d); -} +void test() { XFUZZ1(xvreplve0_d); } diff --git a/code/xvreplve0_h.cpp b/code/xvreplve0_h.cpp index 7da0b757..62117aa8 100644 --- a/code/xvreplve0_h.cpp +++ b/code/xvreplve0_h.cpp @@ -6,6 +6,4 @@ v256 xvreplve0_h(v256 a) { return dst; } -void test() { - XFUZZ1(xvreplve0_h); -} +void test() { XFUZZ1(xvreplve0_h); } diff --git a/code/xvreplve0_q.cpp b/code/xvreplve0_q.cpp index 14d5dbfa..4ee391f9 100644 --- a/code/xvreplve0_q.cpp +++ b/code/xvreplve0_q.cpp @@ -6,6 +6,4 @@ v256 xvreplve0_q(v256 a) { return dst; } -void test() { - XFUZZ1(xvreplve0_q); -} +void test() { XFUZZ1(xvreplve0_q); } diff --git a/code/xvreplve0_w.cpp b/code/xvreplve0_w.cpp index 64947a68..af7d4a56 100644 --- a/code/xvreplve0_w.cpp +++ b/code/xvreplve0_w.cpp @@ -6,6 +6,4 @@ v256 xvreplve0_w(v256 a) { return dst; } -void test() { - XFUZZ1(xvreplve0_w); -} +void test() { XFUZZ1(xvreplve0_w); }