diff --git a/src/alloy/frontend/ppc/test/bin/instr_vpkd3d128.bin b/src/alloy/frontend/ppc/test/bin/instr_vpkd3d128.bin new file mode 100644 index 000000000..44bf995ed Binary files /dev/null and b/src/alloy/frontend/ppc/test/bin/instr_vpkd3d128.bin differ diff --git a/src/alloy/frontend/ppc/test/bin/instr_vpkd3d128.dis b/src/alloy/frontend/ppc/test/bin/instr_vpkd3d128.dis new file mode 100644 index 000000000..82604fd17 --- /dev/null +++ b/src/alloy/frontend/ppc/test/bin/instr_vpkd3d128.dis @@ -0,0 +1,61 @@ + +/vagrant/src/alloy/frontend/ppc/test/bin//instr_vpkd3d128.o: file format elf64-powerpc + + +Disassembly of section .text: + +0000000000100000 : + 100000: 18 81 1e 10 vpkd3d128 v4,v3,0,0,0 + 100004: 4e 80 00 20 blr + +0000000000100008 : + 100008: 18 81 1e 10 vpkd3d128 v4,v3,0,0,0 + 10000c: 4e 80 00 20 blr + +0000000000100010 : + 100010: 18 81 1e 10 vpkd3d128 v4,v3,0,0,0 + 100014: 4e 80 00 20 blr + +0000000000100018 : + 100018: 18 81 1e 50 vpkd3d128 v4,v3,0,0,0 + 10001c: 4e 80 00 20 blr + +0000000000100020 : + 100020: 18 81 1e 90 vpkd3d128 v4,v3,0,0,2 + 100024: 4e 80 00 20 blr + +0000000000100028 : + 100028: 18 81 1e d0 vpkd3d128 v4,v3,0,0,2 + 10002c: 4e 80 00 20 blr + +0000000000100030 : + 100030: 18 82 1e 10 vpkd3d128 v4,v3,0,2,0 + 100034: 4e 80 00 20 blr + +0000000000100038 : + 100038: 18 82 1e 50 vpkd3d128 v4,v3,0,2,0 + 10003c: 4e 80 00 20 blr + +0000000000100040 : + 100040: 18 82 1e 90 vpkd3d128 v4,v3,0,2,2 + 100044: 4e 80 00 20 blr + +0000000000100048 : + 100048: 18 82 1e d0 vpkd3d128 v4,v3,0,2,2 + 10004c: 4e 80 00 20 blr + +0000000000100050 : + 100050: 18 83 1e 10 vpkd3d128 v4,v3,0,2,0 + 100054: 4e 80 00 20 blr + +0000000000100058 : + 100058: 18 83 1e 50 vpkd3d128 v4,v3,0,2,0 + 10005c: 4e 80 00 20 blr + +0000000000100060 : + 100060: 18 83 1e 90 vpkd3d128 v4,v3,0,2,2 + 100064: 4e 80 00 20 blr + +0000000000100068 : + 100068: 18 83 1e d0 vpkd3d128 v4,v3,0,2,2 + 10006c: 4e 80 00 20 blr diff --git a/src/alloy/frontend/ppc/test/bin/instr_vpkd3d128.map b/src/alloy/frontend/ppc/test/bin/instr_vpkd3d128.map new file mode 100644 index 000000000..f52351d9b --- /dev/null +++ b/src/alloy/frontend/ppc/test/bin/instr_vpkd3d128.map @@ -0,0 +1,14 @@ +0000000000000000 t test_vpkd3d128_d3dcolor_invalid_0 +0000000000000008 t test_vpkd3d128_d3dcolor_invalid_1 +0000000000000010 t test_vpkd3d128_d3dcolor_1_0 +0000000000000018 t test_vpkd3d128_d3dcolor_1_1 +0000000000000020 t test_vpkd3d128_d3dcolor_1_2 +0000000000000028 t test_vpkd3d128_d3dcolor_1_3 +0000000000000030 t test_vpkd3d128_d3dcolor_2_0 +0000000000000038 t test_vpkd3d128_d3dcolor_2_1 +0000000000000040 t test_vpkd3d128_d3dcolor_2_2 +0000000000000048 t test_vpkd3d128_d3dcolor_2_3 +0000000000000050 t test_vpkd3d128_d3dcolor_3_0 +0000000000000058 t test_vpkd3d128_d3dcolor_3_1 +0000000000000060 t test_vpkd3d128_d3dcolor_3_2 +0000000000000068 t test_vpkd3d128_d3dcolor_3_3 diff --git a/src/alloy/frontend/ppc/test/instr_vpkd3d128.s b/src/alloy/frontend/ppc/test/instr_vpkd3d128.s new file mode 100644 index 000000000..ccb5d17d0 --- /dev/null +++ b/src/alloy/frontend/ppc/test/instr_vpkd3d128.s @@ -0,0 +1,135 @@ +# vpkd3d128 dest, src, type, mask, shift +# type: +# 0 = PACK_TYPE_D3DCOLOR +# 1 = PACK_TYPE_SHORT_2 +# 3 = PACK_TYPE_FLOAT16_2 +# 5 = PACK_TYPE_FLOAT16_4 +# mask: +# must not be zero +# 1 = 00000000 00000000 00000000 FFFFFFFF +# 2 = 00000000 00000000 FFFFFFFF FFFFFFFF +# 3 = same as 2? except mask3/shift3 +# shift: +# 0 = no shift +# 1 = shift left by one word +# 2 ... +# 3 ... +# special case: mask3/shift3 = 00000000 00000000 00000000 FFFFFFFF + +# vpkd3d128 is broken in binutils, so these are hand coded + +test_vpkd3d128_d3dcolor_invalid_0: + #_ REGISTER_IN v3 [00000001, 00000002, 00000003, 00000004] + #_ REGISTER_IN v4 [CDCDCDCD, CDCDCDCD, CDCDCDCD, CDCDCDCD] + # vpkd3d128 v4, v3, 0, 1, 0 + .long 0x18811E10 + blr + #_ REGISTER_OUT v3 [00000001, 00000002, 00000003, 00000004] + #_ REGISTER_OUT v4 [CDCDCDCD, CDCDCDCD, CDCDCDCD, 00000000] +test_vpkd3d128_d3dcolor_invalid_1: + #_ REGISTER_IN v3 [40800000, 40000000, C2F60000, 4B3BDF83] + #_ REGISTER_IN v4 [CDCDCDCD, CDCDCDCD, CDCDCDCD, CDCDCDCD] + # vpkd3d128 v4, v3, 0, 1, 0 + .long 0x18811E10 + blr + #_ REGISTER_OUT v3 [40800000, 40000000, C2F60000, 4B3BDF83] + #_ REGISTER_OUT v4 [CDCDCDCD, CDCDCDCD, CDCDCDCD, FFFF0000] + +test_vpkd3d128_d3dcolor_1_0: + #_ REGISTER_IN v3 [40400001, 40400002, 40400003, 40400004] + #_ REGISTER_IN v4 [CDCDCDCD, CDCDCDCD, CDCDCDCD, CDCDCDCD] + # vpkd3d128 v4, v3, 0, 1, 0 + .long 0x18811E10 + blr + #_ REGISTER_OUT v3 [40400001, 40400002, 40400003, 40400004] + #_ REGISTER_OUT v4 [CDCDCDCD, CDCDCDCD, CDCDCDCD, 04010203] +test_vpkd3d128_d3dcolor_1_1: + #_ REGISTER_IN v3 [40400001, 40400002, 40400003, 40400004] + #_ REGISTER_IN v4 [CDCDCDCD, CDCDCDCD, CDCDCDCD, CDCDCDCD] + # vpkd3d128 v4, v3, 0, 1, 1 + .long 0x18811E50 + blr + #_ REGISTER_OUT v3 [40400001, 40400002, 40400003, 40400004] + #_ REGISTER_OUT v4 [CDCDCDCD, CDCDCDCD, 04010203, CDCDCDCD] +test_vpkd3d128_d3dcolor_1_2: + #_ REGISTER_IN v3 [40400001, 40400002, 40400003, 40400004] + #_ REGISTER_IN v4 [CDCDCDCD, CDCDCDCD, CDCDCDCD, CDCDCDCD] + # vpkd3d128 v4, v3, 0, 1, 2 + .long 0x18811E90 + blr + #_ REGISTER_OUT v3 [40400001, 40400002, 40400003, 40400004] + #_ REGISTER_OUT v4 [CDCDCDCD, 04010203, CDCDCDCD, CDCDCDCD] +test_vpkd3d128_d3dcolor_1_3: + #_ REGISTER_IN v3 [40400001, 40400002, 40400003, 40400004] + #_ REGISTER_IN v4 [CDCDCDCD, CDCDCDCD, CDCDCDCD, CDCDCDCD] + # vpkd3d128 v4, v3, 0, 1, 3 + .long 0x18811ED0 + blr + #_ REGISTER_OUT v3 [40400001, 40400002, 40400003, 40400004] + #_ REGISTER_OUT v4 [04010203, CDCDCDCD, CDCDCDCD, CDCDCDCD] + +test_vpkd3d128_d3dcolor_2_0: + #_ REGISTER_IN v3 [40400001, 40400002, 40400003, 40400004] + #_ REGISTER_IN v4 [CDCDCDCD, CDCDCDCD, CDCDCDCD, CDCDCDCD] + # vpkd3d128 v4, v3, 0, 2, 0 + .long 0x18821E10 + blr + #_ REGISTER_OUT v3 [40400001, 40400002, 40400003, 40400004] + #_ REGISTER_OUT v4 [CDCDCDCD, CDCDCDCD, 00000000, 04010203] +test_vpkd3d128_d3dcolor_2_1: + #_ REGISTER_IN v3 [40400001, 40400002, 40400003, 40400004] + #_ REGISTER_IN v4 [CDCDCDCD, CDCDCDCD, CDCDCDCD, CDCDCDCD] + # vpkd3d128 v4, v3, 0, 2, 1 + .long 0x18821E50 + blr + #_ REGISTER_OUT v3 [40400001, 40400002, 40400003, 40400004] + #_ REGISTER_OUT v4 [CDCDCDCD, 00000000, 04010203, CDCDCDCD] +test_vpkd3d128_d3dcolor_2_2: + #_ REGISTER_IN v3 [40400001, 40400002, 40400003, 40400004] + #_ REGISTER_IN v4 [CDCDCDCD, CDCDCDCD, CDCDCDCD, CDCDCDCD] + # vpkd3d128 v4, v3, 0, 2, 2 + .long 0x18821E90 + blr + #_ REGISTER_OUT v3 [40400001, 40400002, 40400003, 40400004] + #_ REGISTER_OUT v4 [00000000, 04010203, CDCDCDCD, CDCDCDCD] +test_vpkd3d128_d3dcolor_2_3: + #_ REGISTER_IN v3 [40400001, 40400002, 40400003, 40400004] + #_ REGISTER_IN v4 [CDCDCDCD, CDCDCDCD, CDCDCDCD, CDCDCDCD] + # vpkd3d128 v4, v3, 0, 2, 3 + .long 0x18821ED0 + blr + #_ REGISTER_OUT v3 [40400001, 40400002, 40400003, 40400004] + #_ REGISTER_OUT v4 [04010203, CDCDCDCD, CDCDCDCD, CDCDCDCD] + +test_vpkd3d128_d3dcolor_3_0: + #_ REGISTER_IN v3 [40400001, 40400002, 40400003, 40400004] + #_ REGISTER_IN v4 [CDCDCDCD, CDCDCDCD, CDCDCDCD, CDCDCDCD] + # vpkd3d128 v4, v3, 0, 3, 0 + .long 0x18831E10 + blr + #_ REGISTER_OUT v3 [40400001, 40400002, 40400003, 40400004] + #_ REGISTER_OUT v4 [CDCDCDCD, CDCDCDCD, 00000000, 04010203] +test_vpkd3d128_d3dcolor_3_1: + #_ REGISTER_IN v3 [40400001, 40400002, 40400003, 40400004] + #_ REGISTER_IN v4 [CDCDCDCD, CDCDCDCD, CDCDCDCD, CDCDCDCD] + # vpkd3d128 v4, v3, 0, 3, 1 + .long 0x18831E50 + blr + #_ REGISTER_OUT v3 [40400001, 40400002, 40400003, 40400004] + #_ REGISTER_OUT v4 [CDCDCDCD, 00000000, 04010203, CDCDCDCD] +test_vpkd3d128_d3dcolor_3_2: + #_ REGISTER_IN v3 [40400001, 40400002, 40400003, 40400004] + #_ REGISTER_IN v4 [CDCDCDCD, CDCDCDCD, CDCDCDCD, CDCDCDCD] + # vpkd3d128 v4, v3, 0, 3, 2 + .long 0x18831E90 + blr + #_ REGISTER_OUT v3 [40400001, 40400002, 40400003, 40400004] + #_ REGISTER_OUT v4 [00000000, 04010203, CDCDCDCD, CDCDCDCD] +test_vpkd3d128_d3dcolor_3_3: + #_ REGISTER_IN v3 [40400001, 40400002, 40400003, 40400004] + #_ REGISTER_IN v4 [CDCDCDCD, CDCDCDCD, CDCDCDCD, CDCDCDCD] + # vpkd3d128 v4, v3, 0, 3, 3 + .long 0x18831ED0 + blr + #_ REGISTER_OUT v3 [40400001, 40400002, 40400003, 40400004] + #_ REGISTER_OUT v4 [CDCDCDCD, CDCDCDCD, CDCDCDCD, 00000000]