Extends PSHUFB unit tests to ensure correct behaviour

Explicitly testign bits being set in the reserved bits
This commit is contained in:
Ryan Houdek committed 2020-10-04 16:12:22 -07:00
1 parent 4ff7046ddb
commit 5466ea4df2
2 files changed
+64

No files matched your search

+36
View File
@@ -0,0 +1,36 @@
%ifdef CONFIG
{
"RegData": {
"XMM0": ["0x5858585858585858", "0x5858585858585858"],
"XMM1": ["0x0", "0x0"]
}
}
%endif
mov rdx, 0xe0000000
mov rax, 0x4142434445464748
mov [rdx + 8 * 0], rax
mov rax, 0x5152535455565758
mov [rdx + 8 * 1], rax
movaps xmm0, [rdx + 8 * 0]
movaps xmm1, [rdx + 8 * 0]
lea rdx, [rel .data]
pshufb xmm0, [rdx + 8 * 0]
pshufb xmm1, [rdx + 8 * 2]
hlt
align 8
.data:
; Test bits with trash data in reserved bits to ensure it is ignored
; Select single element
dq 0x7878787878787878
dq 0x7878787878787878
; Clear element
dq 0xF0F0F0F0F0F0F0F0
dq 0xF0F0F0F0F0F0F0F0
+28
View File
@@ -0,0 +1,28 @@
%ifdef CONFIG
{
"RegData": {
"MM0": "0x4444444444444444",
"MM1": "0x0"
}
}
%endif
lea rdx, [rel .data]
movq mm0, [rdx + 8 * 0]
movq mm1, [rdx + 8 * 0]
pshufb mm0, [rdx + 8 * 1]
pshufb mm1, [rdx + 8 * 2]
hlt
align 8
.data:
; Incoming vector
dq 0x4142434445464748
; Test bits with trash data in reserved bits to ensure it is ignored
; Select single element
dq 0x7C7C7C7C7C7C7C7C
; Clear element
dq 0xF8F8F8F8F8F8F8F8