Implements PHADD/PHSUB XMM unit tests

This commit is contained in:
Ryan Houdek 2020-09-26 22:01:23 +01:00
parent 5547b3aa92
commit ce16ce887b
4 changed files with 108 additions and 0 deletions

View File

@ -0,0 +1,27 @@
%ifdef CONFIG
{
"RegData": {
"XMM0": ["0xA4A6ACAE84868C8E", "0xE4E6ECEEC4C6CCCE"],
"XMM1": ["0xE4E6ECEEC4C6CCCE", "0xA4A6ACAE84868C8E"]
}
}
%endif
mov rdx, 0xe0000000
mov rax, 0x4142434445464748
mov [rdx + 8 * 0], rax
mov rax, 0x5152535455565758
mov [rdx + 8 * 1], rax
mov rax, 0x6162636465666768
mov [rdx + 8 * 2], rax
mov rax, 0x7172737475767778
mov [rdx + 8 * 3], rax
movaps xmm0, [rdx + 8 * 0]
movaps xmm1, [rdx + 8 * 2]
phaddw xmm0, [rdx + 8 * 2]
phaddw xmm1, [rdx + 8 * 0]
hlt

View File

@ -0,0 +1,27 @@
%ifdef CONFIG
{
"RegData": {
"XMM0": ["0xA6A8AAAC86888A8C", "0xE6E8EAECC6C8CACC"],
"XMM1": ["0xE6E8EAECC6C8CACC", "0xA6A8AAAC86888A8C"]
}
}
%endif
mov rdx, 0xe0000000
mov rax, 0x4142434445464748
mov [rdx + 8 * 0], rax
mov rax, 0x5152535455565758
mov [rdx + 8 * 1], rax
mov rax, 0x6162636465666768
mov [rdx + 8 * 2], rax
mov rax, 0x7172737475767778
mov [rdx + 8 * 3], rax
movaps xmm0, [rdx + 8 * 0]
movaps xmm1, [rdx + 8 * 2]
phaddd xmm0, [rdx + 8 * 2]
phaddd xmm1, [rdx + 8 * 0]
hlt

View File

@ -0,0 +1,27 @@
%ifdef CONFIG
{
"RegData": {
"XMM0": ["0xF202F20212021202", "0x0202020202020202"],
"XMM1": ["0x0202020202020202", "0xF202F20212021202"]
}
}
%endif
mov rdx, 0xe0000000
mov rax, 0x5142634475468748
mov [rdx + 8 * 0], rax
mov rax, 0x5152435435562758
mov [rdx + 8 * 1], rax
mov rax, 0x6172637465766778
mov [rdx + 8 * 2], rax
mov rax, 0x7162736475667768
mov [rdx + 8 * 3], rax
movaps xmm0, [rdx + 8 * 0]
movaps xmm1, [rdx + 8 * 2]
phsubw xmm0, [rdx + 8 * 2]
phsubw xmm1, [rdx + 8 * 0]
hlt

View File

@ -0,0 +1,27 @@
%ifdef CONFIG
{
"RegData": {
"XMM0": ["0xE403E40424042404", "0x0404040404040404"],
"XMM1": ["0x0404040404040404", "0xE403E40424042404"]
}
}
%endif
mov rdx, 0xe0000000
mov rax, 0x5142634475468748
mov [rdx + 8 * 0], rax
mov rax, 0x5152435435562758
mov [rdx + 8 * 1], rax
mov rax, 0x6172637465766778
mov [rdx + 8 * 2], rax
mov rax, 0x7162736475667768
mov [rdx + 8 * 3], rax
movaps xmm0, [rdx + 8 * 0]
movaps xmm1, [rdx + 8 * 2]
phsubd xmm0, [rdx + 8 * 2]
phsubd xmm1, [rdx + 8 * 0]
hlt