From 64b0cc9d5ecedb47d06dc62c6e533a0314be2799 Mon Sep 17 00:00:00 2001 From: "Dr. Chat" Date: Fri, 6 Nov 2015 14:57:42 -0600 Subject: [PATCH] Enabled tests for vpkuhum/vpkuwum and added test with negative numbers for vpkuwus --- .../cpu/frontend/testing/instr_vpkuhum.s | 73 +++++++++---------- .../cpu/frontend/testing/instr_vpkuwum.s | 67 +++++++++-------- .../cpu/frontend/testing/instr_vpkuwus.s | 12 +++ 3 files changed, 81 insertions(+), 71 deletions(-) diff --git a/src/xenia/cpu/frontend/testing/instr_vpkuhum.s b/src/xenia/cpu/frontend/testing/instr_vpkuhum.s index de1aa6450..3eebaef8c 100644 --- a/src/xenia/cpu/frontend/testing/instr_vpkuhum.s +++ b/src/xenia/cpu/frontend/testing/instr_vpkuhum.s @@ -1,39 +1,38 @@ -#vpkuhum isn't implemented yet -#test_vpkuhum_1: -# # {0, 1, 2, 3, 4, 5, 6, 7} -# #_ REGISTER_IN v3 [00000001, 00020003, 00040005, 00060007] -# # {8, 9, 10, 11, 12, 13, 14, 15} -# #_ REGISTER_IN v4 [00080009, 000A000B, 000C000D, 000E000F] -# vpkuhum v5, v3, v4 -# blr -# #_ REGISTER_OUT v3 [00000001, 00020003, 00040005, 00060007] -# #_ REGISTER_OUT v4 [00080009, 000A000B, 000C000D, 000E000F] -# # {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15} -# #_ REGISTER_OUT v5 [00010203, 04050607, 08090A0B, 0C0D0E0F] -# blr +test_vpkuhum_1: + # {0, 1, 2, 3, 4, 5, 6, 7} + #_ REGISTER_IN v3 [00000001, 00020003, 00040005, 00060007] + # {8, 9, 10, 11, 12, 13, 14, 15} + #_ REGISTER_IN v4 [00080009, 000A000B, 000C000D, 000E000F] + vpkuhum v5, v3, v4 + blr + #_ REGISTER_OUT v3 [00000001, 00020003, 00040005, 00060007] + #_ REGISTER_OUT v4 [00080009, 000A000B, 000C000D, 000E000F] + # {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15} + #_ REGISTER_OUT v5 [00010203, 04050607, 08090A0B, 0C0D0E0F] + blr -#test_vpkuhum_2: -# # {-8, -7, -6, -5, -4, -3, -2, -1} -# #_ REGISTER_IN v3 [FFF8FFF9, FFFAFFFB, FFFCFFFD, FFFEFFFF] -# # {0, 1, 2, 3, 4, 5, 6, 7} -# #_ REGISTER_IN v4 [00000001, 00020003, 00040005, 00060007] -# vpkuhum v5, v3, v4 -# blr -# #_ REGISTER_OUT v3 [FFF8FFF9, FFFAFFFB, FFFCFFFD, FFFEFFFF] -# #_ REGISTER_OUT v4 [00000001, 00020003, 00040005, 00060007] -# # {-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7} -# #_ REGISTER_OUT v5 [F8F9FAFB, FCFDFEFF, 00010203, 04050607] -# blr +test_vpkuhum_2: + # {-8, -7, -6, -5, -4, -3, -2, -1} + #_ REGISTER_IN v3 [FFF8FFF9, FFFAFFFB, FFFCFFFD, FFFEFFFF] + # {0, 1, 2, 3, 4, 5, 6, 7} + #_ REGISTER_IN v4 [00000001, 00020003, 00040005, 00060007] + vpkuhum v5, v3, v4 + blr + #_ REGISTER_OUT v3 [FFF8FFF9, FFFAFFFB, FFFCFFFD, FFFEFFFF] + #_ REGISTER_OUT v4 [00000001, 00020003, 00040005, 00060007] + # {-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7} + #_ REGISTER_OUT v5 [F8F9FAFB, FCFDFEFF, 00010203, 04050607] + blr -#test_vpkuhum_3: -# # {0, 65535, 65535, 0, 0, 0, 65535, 0} -# #_ REGISTER_IN v3 [0000FFFF, FFFF0000, 00000000, FFFF0000] -# # {65535, 0, 0, 65535, 65535, 65535, 0, 65535} -# #_ REGISTER_IN v4 [FFFF0000, 0000FFFF, FFFFFFFF, 0000FFFF] -# vpkuhum v5, v3, v4 -# blr -# #_ REGISTER_OUT v3 [0000FFFF, FFFF0000, 00000000, FFFF0000] -# #_ REGISTER_OUT v4 [FFFF0000, 0000FFFF, FFFFFFFF, 0000FFFF] -# # {0, 255, 255, 0, 0, 0, 255, 0, 255, 0, 0, 255, 255, 255, 0, 255} -# #_ REGISTER_OUT v5 [00FFFF00, 0000FF00, FF0000FF, FFFF00FF] -# blr +test_vpkuhum_3: + # {0, 65535, 65535, 0, 0, 0, 65535, 0} + #_ REGISTER_IN v3 [0000FFFF, FFFF0000, 00000000, FFFF0000] + # {65535, 0, 0, 65535, 65535, 65535, 0, 65535} + #_ REGISTER_IN v4 [FFFF0000, 0000FFFF, FFFFFFFF, 0000FFFF] + vpkuhum v5, v3, v4 + blr + #_ REGISTER_OUT v3 [0000FFFF, FFFF0000, 00000000, FFFF0000] + #_ REGISTER_OUT v4 [FFFF0000, 0000FFFF, FFFFFFFF, 0000FFFF] + # {0, 255, 255, 0, 0, 0, 255, 0, 255, 0, 0, 255, 255, 255, 0, 255} + #_ REGISTER_OUT v5 [00FFFF00, 0000FF00, FF0000FF, FFFF00FF] + blr diff --git a/src/xenia/cpu/frontend/testing/instr_vpkuwum.s b/src/xenia/cpu/frontend/testing/instr_vpkuwum.s index 28841cfe0..66116f7a9 100644 --- a/src/xenia/cpu/frontend/testing/instr_vpkuwum.s +++ b/src/xenia/cpu/frontend/testing/instr_vpkuwum.s @@ -1,36 +1,35 @@ -#vpkuwum isn't implemented yet -#test_vpkuwum_1: -# # {0, 1, 2, 3} -# #_ REGISTER_IN v3 [00000000, 00000001, 00000002, 00000003] -# # {4, 5, 6, 7} -# #_ REGISTER_IN v4 [00000004, 00000005, 00000006, 00000007] -# vpkuwum v5, v3, v4 -# blr -# #_ REGISTER_OUT v3 [00000000, 00000001, 00000002, 00000003] -# #_ REGISTER_OUT v4 [00000004, 00000005, 00000006, 00000007] -# # {0, 1, 2, 3, 4, 5, 6, 7} -# #_ REGISTER_OUT v5 [00000001, 00020003, 00040005, 00060007] +test_vpkuwum_1: + # {0, 1, 2, 3} + #_ REGISTER_IN v3 [00000000, 00000001, 00000002, 00000003] + # {4, 5, 6, 7} + #_ REGISTER_IN v4 [00000004, 00000005, 00000006, 00000007] + vpkuwum v5, v3, v4 + blr + #_ REGISTER_OUT v3 [00000000, 00000001, 00000002, 00000003] + #_ REGISTER_OUT v4 [00000004, 00000005, 00000006, 00000007] + # {0, 1, 2, 3, 4, 5, 6, 7} + #_ REGISTER_OUT v5 [00000001, 00020003, 00040005, 00060007] -#test_vpkuwum_2: -# # {-4, -3, -2, -1} -# #_ REGISTER_IN v3 [FFFFFFFC, FFFFFFFD, FFFFFFFE, FFFFFFFF] -# # {0, 1, 2, 3} -# #_ REGISTER_IN v4 [00000000, 00000001, 00000002, 00000003] -# vpkuwum v5, v3, v4 -# blr -# #_ REGISTER_OUT v3 [FFFFFFFC, FFFFFFFD, FFFFFFFE, FFFFFFFF] -# #_ REGISTER_OUT v4 [00000000, 00000001, 00000002, 00000003] -# # {-4, -3, -2, -1, 0, 1, 2, 3} -# #_ REGISTER_OUT v5 [FFFCFFFD, FFFEFFFF, 00000001, 00020003] +test_vpkuwum_2: + # {-4, -3, -2, -1} + #_ REGISTER_IN v3 [FFFFFFFC, FFFFFFFD, FFFFFFFE, FFFFFFFF] + # {0, 1, 2, 3} + #_ REGISTER_IN v4 [00000000, 00000001, 00000002, 00000003] + vpkuwum v5, v3, v4 + blr + #_ REGISTER_OUT v3 [FFFFFFFC, FFFFFFFD, FFFFFFFE, FFFFFFFF] + #_ REGISTER_OUT v4 [00000000, 00000001, 00000002, 00000003] + # {-4, -3, -2, -1, 0, 1, 2, 3} + #_ REGISTER_OUT v5 [FFFCFFFD, FFFEFFFF, 00000001, 00020003] -#test_vpkuwum_3: -# # {0, 4294967295, 4294967295, 4294967295} -# #_ REGISTER_IN v3 [00000000, FFFFFFFF, FFFFFFFF, FFFFFFFF] -# # {4294967295, 0, 0, 0} -# #_ REGISTER_IN v4 [FFFFFFFF, 00000000, 00000000, 00000000] -# vpkuwum v5, v3, v4 -# blr -# #_ REGISTER_OUT v3 [00000000, FFFFFFFF, FFFFFFFF, FFFFFFFF] -# #_ REGISTER_OUT v4 [FFFFFFFF, 00000000, 00000000, 00000000] -# # {0, 65535, 65535, 65535, 65535, 0, 0, 0} -# #_ REGISTER_OUT v5 [0000FFFF, FFFFFFFF, FFFF0000, 00000000] +test_vpkuwum_3: + # {0, 4294967295, 4294967295, 4294967295} + #_ REGISTER_IN v3 [00000000, FFFFFFFF, FFFFFFFF, FFFFFFFF] + # {4294967295, 0, 0, 0} + #_ REGISTER_IN v4 [FFFFFFFF, 00000000, 00000000, 00000000] + vpkuwum v5, v3, v4 + blr + #_ REGISTER_OUT v3 [00000000, FFFFFFFF, FFFFFFFF, FFFFFFFF] + #_ REGISTER_OUT v4 [FFFFFFFF, 00000000, 00000000, 00000000] + # {0, 65535, 65535, 65535, 65535, 0, 0, 0} + #_ REGISTER_OUT v5 [0000FFFF, FFFFFFFF, FFFF0000, 00000000] diff --git a/src/xenia/cpu/frontend/testing/instr_vpkuwus.s b/src/xenia/cpu/frontend/testing/instr_vpkuwus.s index ee1cfa37c..7f117c1eb 100644 --- a/src/xenia/cpu/frontend/testing/instr_vpkuwus.s +++ b/src/xenia/cpu/frontend/testing/instr_vpkuwus.s @@ -9,3 +9,15 @@ test_vpkuwus_1: #_ REGISTER_OUT v4 [00000002, 00010002, 00000003, 00010003] # {0, 65535, 1, 65535, 2, 65535, 3, 65535} #_ REGISTER_OUT v5 [0000FFFF, 0001FFFF, 0002FFFF, 0003FFFF] + +test_vpkuwus_2: + # {2147483648, 2147483647, 2, 3} + #_ REGISTER_IN v3 [80000000, 7FFFFFFF, 00000002, 00000003] + # {4294967295, 65538, 4294967294, 16} + #_ REGISTER_IN v4 [FFFFFFFF, 00010002, FFFFFFFE, 00000010] + vpkuwus v5, v3, v4 + blr + #_ REGISTER_OUT v3 [80000000, 7FFFFFFF, 00000002, 00000003] + #_ REGISTER_OUT v4 [FFFFFFFF, 00010002, FFFFFFFE, 00000010] + # {65535, 65535, 2, 3, 65535, 65535, 65535, 16} + #_ REGISTER_OUT v5 [FFFFFFFF, 00020003, FFFFFFFF, FFFF0010]