From ba9d2f0d7cecf5f6b8b7dbd3dc054ed68a975236 Mon Sep 17 00:00:00 2001 From: gibbed Date: Sun, 16 Aug 2015 06:09:52 -0500 Subject: [PATCH] More tests for vupkhsb, vupkhsh, vupklsb, vupklsh. --- src/xenia/cpu/frontend/testing/instr_vupkhsb.s | 8 ++++++++ src/xenia/cpu/frontend/testing/instr_vupkhsh.s | 8 ++++++++ src/xenia/cpu/frontend/testing/instr_vupklsb.s | 8 ++++++++ src/xenia/cpu/frontend/testing/instr_vupklsh.s | 8 ++++++++ 4 files changed, 32 insertions(+) diff --git a/src/xenia/cpu/frontend/testing/instr_vupkhsb.s b/src/xenia/cpu/frontend/testing/instr_vupkhsb.s index 541493eda..b2eb20f2f 100644 --- a/src/xenia/cpu/frontend/testing/instr_vupkhsb.s +++ b/src/xenia/cpu/frontend/testing/instr_vupkhsb.s @@ -5,3 +5,11 @@ test_vupkhsb_0: blr # {-8, -7, -6, -5, -4, -3, -2, -1} #_ REGISTER_OUT v3 [FFF8FFF9, FFFAFFFB, FFFCFFFD, FFFEFFFF] + +test_vupkhsb_1: + # {0, 255, 255, 0, 0, 0, 255, 0, 255, 0, 0, 255, 255, 255, 0, 255} + #_ REGISTER_IN v3 [00FFFF00, 0000FF00, FF0000FF, FFFF00FF] + vupkhsb v3, v3 + blr + # {0, 65535, 65535, 0, 0, 0, 65535, 0} + #_ REGISTER_OUT v3 [0000FFFF, FFFF0000, 00000000, FFFF0000] diff --git a/src/xenia/cpu/frontend/testing/instr_vupkhsh.s b/src/xenia/cpu/frontend/testing/instr_vupkhsh.s index 1f4c6414e..412334e91 100644 --- a/src/xenia/cpu/frontend/testing/instr_vupkhsh.s +++ b/src/xenia/cpu/frontend/testing/instr_vupkhsh.s @@ -11,6 +11,14 @@ test_vupkhsh_1: #_ REGISTER_OUT v3 [00007f80, 00000203, 00000405, 00000607] test_vupkhsh_2: + # {0, 65535, 65535, 0, 0, 0, 65535, 0} + #_ REGISTER_IN v3 [0000FFFF, FFFF0000, 00000000, FFFF0000] + vupkhsh v3, v3 + blr + # {0, 4294967295, 4294967295, 0} + #_ REGISTER_OUT v3 [00000000, FFFFFFFF, FFFFFFFF, 00000000] + +test_vupkhsh_3: # {-4, -3, -2, -1, 0, 1, 2, 3} #_ REGISTER_IN v3 [FFFCFFFD, FFFEFFFF, 00000001, 00020003] vupkhsh v3, v3 diff --git a/src/xenia/cpu/frontend/testing/instr_vupklsb.s b/src/xenia/cpu/frontend/testing/instr_vupklsb.s index 7473b5fd5..469c91e3f 100644 --- a/src/xenia/cpu/frontend/testing/instr_vupklsb.s +++ b/src/xenia/cpu/frontend/testing/instr_vupklsb.s @@ -5,3 +5,11 @@ test_vupklsb_0: blr # {0, 1, 2, 3, 4, 5, 6, 7} #_ REGISTER_OUT v3 [00000001, 00020003, 00040005, 00060007] + +test_vupklsb_1: + # {0, 255, 255, 0, 0, 0, 255, 0, 255, 0, 0, 255, 255, 255, 0, 255} + #_ REGISTER_IN v3 [00FFFF00, 0000FF00, FF0000FF, FFFF00FF] + vupklsb v3, v3 + blr + # {65535, 0, 0, 65535, 65535, 65535, 0, 65535} + #_ REGISTER_OUT v3 [FFFF0000, 0000FFFF, FFFFFFFF, 0000FFFF] diff --git a/src/xenia/cpu/frontend/testing/instr_vupklsh.s b/src/xenia/cpu/frontend/testing/instr_vupklsh.s index 6295744fd..821c117da 100644 --- a/src/xenia/cpu/frontend/testing/instr_vupklsh.s +++ b/src/xenia/cpu/frontend/testing/instr_vupklsh.s @@ -17,3 +17,11 @@ test_vupklsh_2: blr # {-4, -3, -2, -1} #_ REGISTER_OUT v3 [00000000, 00000001, 00000002, 00000003] + +test_vupklsh_3: + # {0, 65535, 65535, 0, 0, 0, 65535, 0} + #_ REGISTER_IN v3 [0000FFFF, FFFF0000, 00000000, FFFF0000] + vupklsh v3, v3 + blr + # {0, 0, 4294967295, 0} + #_ REGISTER_OUT v3 [00000000, 00000000, FFFFFFFF, 00000000]