FEX/unittests/ASM/VEX/vpinsrw.asm
2023-03-14 14:17:55 -04:00

60 lines
2.4 KiB
NASM

%ifdef CONFIG
{
"HostFeatures": ["AVX"],
"RegData": {
"XMM0": ["0x4142434445467778", "0x5152535455565758", "0x0000000000000000", "0x0000000000000000"],
"XMM1": ["0x4142434477784748", "0x5152535455565758", "0x0000000000000000", "0x0000000000000000"],
"XMM2": ["0x4142777845464748", "0x5152535455565758", "0x0000000000000000", "0x0000000000000000"],
"XMM3": ["0x7778434445464748", "0x5152535455565758", "0x0000000000000000", "0x0000000000000000"],
"XMM4": ["0x4142434445464748", "0x5152535455567778", "0x0000000000000000", "0x0000000000000000"],
"XMM5": ["0x4142434445464748", "0x5152535477785758", "0x0000000000000000", "0x0000000000000000"],
"XMM6": ["0x4142434445464748", "0x5152777855565758", "0x0000000000000000", "0x0000000000000000"],
"XMM7": ["0x4142434445464748", "0x7778535455565758", "0x0000000000000000", "0x0000000000000000"],
"XMM8": ["0x4142434445467778", "0x5152535455565758", "0x0000000000000000", "0x0000000000000000"],
"XMM9": ["0x4142434477784748", "0x5152535455565758", "0x0000000000000000", "0x0000000000000000"],
"XMM10": ["0x4142777845464748", "0x5152535455565758", "0x0000000000000000", "0x0000000000000000"],
"XMM11": ["0x7778434445464748", "0x5152535455565758", "0x0000000000000000", "0x0000000000000000"],
"XMM12": ["0x4142434445464748", "0x5152535455567778", "0x0000000000000000", "0x0000000000000000"],
"XMM13": ["0x4142434445464748", "0x5152535477785758", "0x0000000000000000", "0x0000000000000000"],
"XMM14": ["0x4142434445464748", "0x5152777855565758", "0x0000000000000000", "0x0000000000000000"],
"XMM15": ["0x4142434445464748", "0x7778535455565758", "0x0000000000000000", "0x0000000000000000"]
}
}
%endif
lea rdx, [rel .data]
mov rax, 0x7172737475767778
vmovapd ymm0, [rdx]
vpinsrw xmm1, xmm0, eax, 1
vpinsrw xmm2, xmm0, eax, 2
vpinsrw xmm3, xmm0, eax, 3
vpinsrw xmm4, xmm0, eax, 4
vpinsrw xmm5, xmm0, eax, 5
vpinsrw xmm6, xmm0, eax, 6
vpinsrw xmm7, xmm0, eax, 7
vpinsrw xmm8, xmm0, [rdx + 32], 0
vpinsrw xmm9, xmm0, [rdx + 32], 1
vpinsrw xmm10, xmm0, [rdx + 32], 2
vpinsrw xmm11, xmm0, [rdx + 32], 3
vpinsrw xmm12, xmm0, [rdx + 32], 4
vpinsrw xmm13, xmm0, [rdx + 32], 5
vpinsrw xmm14, xmm0, [rdx + 32], 6
vpinsrw xmm15, xmm0, [rdx + 32], 7
vpinsrw xmm0, xmm0, eax, 0
hlt
align 32
.data:
dq 0x4142434445464748
dq 0x5152535455565758
dq 0x6162636465666768
dq 0x7172737475767778
dq 0x7172737475767778