Skip to content

Commit

Permalink
Add 3C5000 special result for xvpermi_q
Browse files Browse the repository at this point in the history
  • Loading branch information
jiegec committed Dec 14, 2023
1 parent dab1679 commit df03724
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 18 deletions.
2 changes: 2 additions & 0 deletions code/xvpermi_q.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
14 changes: 11 additions & 3 deletions code/xvpermi_q.h
Original file line number Diff line number Diff line change
@@ -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];
}
4 changes: 1 addition & 3 deletions code/xvreplve0_b.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ v256 xvreplve0_b(v256 a) {
return dst;
}

void test() {
XFUZZ1(xvreplve0_b);
}
void test() { XFUZZ1(xvreplve0_b); }
4 changes: 1 addition & 3 deletions code/xvreplve0_d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ v256 xvreplve0_d(v256 a) {
return dst;
}

void test() {
XFUZZ1(xvreplve0_d);
}
void test() { XFUZZ1(xvreplve0_d); }
4 changes: 1 addition & 3 deletions code/xvreplve0_h.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ v256 xvreplve0_h(v256 a) {
return dst;
}

void test() {
XFUZZ1(xvreplve0_h);
}
void test() { XFUZZ1(xvreplve0_h); }
4 changes: 1 addition & 3 deletions code/xvreplve0_q.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ v256 xvreplve0_q(v256 a) {
return dst;
}

void test() {
XFUZZ1(xvreplve0_q);
}
void test() { XFUZZ1(xvreplve0_q); }
4 changes: 1 addition & 3 deletions code/xvreplve0_w.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ v256 xvreplve0_w(v256 a) {
return dst;
}

void test() {
XFUZZ1(xvreplve0_w);
}
void test() { XFUZZ1(xvreplve0_w); }

0 comments on commit df03724

Please sign in to comment.