FEX/unittests/ASM/VEX/vsubps.asm
2022-12-12 21:05:30 +00:00

44 lines
1.2 KiB
NASM

%ifdef CONFIG
{
"HostFeatures": ["AVX"],
"RegData": {
"XMM0": ["0x400000003F800000", "0x4080000040400000", "0x400000003F800000", "0x4080000040400000"],
"XMM1": ["0x40C0000040A00000", "0x4100000040E00000", "0x40C0000040A00000", "0x4100000040E00000"],
"XMM3": ["0xC0800000C0800000", "0xC0800000C0800000", "0x0000000000000000", "0x0000000000000000"],
"XMM4": ["0xC0800000C0800000", "0xC0800000C0800000", "0xC0800000C0800000", "0xC0800000C0800000"],
"XMM5": ["0xC0800000C0800000", "0xC0800000C0800000", "0x0000000000000000", "0x0000000000000000"],
"XMM6": ["0xC0800000C0800000", "0xC0800000C0800000", "0xC0800000C0800000", "0xC0800000C0800000"]
},
"MemoryRegions": {
"0x100000000": "4096"
}
}
%endif
lea rdx, [rel .data]
vmovapd ymm0, [rdx + 0]
vmovapd ymm1, [rdx + 32]
; Register only
vsubps xmm3, xmm0, xmm1
vsubps ymm4, ymm0, ymm1
; Memory operand
vsubps xmm5, xmm0, [rdx + 32]
vsubps ymm6, ymm0, [rdx + 32]
hlt
align 32
.data:
dq 0x400000003F800000 ; 2, 1
dq 0x4080000040400000 ; 4, 3
dq 0x400000003F800000 ; 2, 1
dq 0x4080000040400000 ; 4, 3
dq 0x40C0000040A00000 ; 6, 5
dq 0x4100000040E00000 ; 8, 7
dq 0x40C0000040A00000 ; 6, 5
dq 0x4100000040E00000 ; 8, 7