Unit test for the cvttps2dq instruction

This commit is contained in:
Ryan Houdek 2020-04-05 14:26:17 -07:00
parent 6f2726379c
commit 812c8a9b4d

View File

@ -0,0 +1,38 @@
%ifdef CONFIG
{
"RegData": {
"XMM0": ["0x0000000100000001", "0x0000000200000002"],
"XMM1": ["0x0000000400000004", "0x0000000800000008"]
},
"MemoryRegions": {
"0x100000000": "4096"
}
}
%endif
mov rdx, 0xe0000000
mov rax, 0x3fc000003f800000 ; [1.5, 1.0]
mov [rdx + 8 * 0], rax
mov rax, 0x4039999a40000000 ; [2.9, 2.0]
mov [rdx + 8 * 1], rax
mov rax, 0x4083333340800000 ; [4.1, 4.0]
mov [rdx + 8 * 2], rax
mov rax, 0x4108000041000000 ; [8.5, 8.0]
mov [rdx + 8 * 3], rax
mov rax, 0x4142434445464748
mov [rdx + 8 * 4], rax
mov rax, 0x5152535455565758
mov [rdx + 8 * 5], rax
movapd xmm0, [rdx + 8 * 4]
movapd xmm1, [rdx + 8 * 4]
movapd xmm2, [rdx + 8 * 0]
cvttps2dq xmm0, xmm2
cvttps2dq xmm1, [rdx + 8 * 2]
hlt