mirror of
https://github.com/FEX-Emu/FEX.git
synced 2025-01-23 23:17:44 +00:00
OpcodeDispatcher: Handle VPADDUSW
This commit is contained in:
parent
287cee5b41
commit
d9176114c5
@ -5915,6 +5915,7 @@ void OpDispatchBuilder::InstallHostSpecificOpcodeHandlers() {
|
||||
|
||||
{OPD(1, 0b01, 0xDB), 1, &OpDispatchBuilder::AVXVectorALUOp<IR::OP_VAND, 16>},
|
||||
{OPD(1, 0b01, 0xDC), 1, &OpDispatchBuilder::AVXVectorALUOp<IR::OP_VUQADD, 1>},
|
||||
{OPD(1, 0b01, 0xDD), 1, &OpDispatchBuilder::AVXVectorALUOp<IR::OP_VUQADD, 2>},
|
||||
{OPD(1, 0b01, 0xDF), 1, &OpDispatchBuilder::VANDNOp},
|
||||
|
||||
{OPD(1, 0b01, 0xE0), 1, &OpDispatchBuilder::AVXVectorALUOp<IR::OP_VURAVG, 1>},
|
||||
|
@ -423,6 +423,8 @@ void OpDispatchBuilder::AVXVectorALUOp<IR::OP_VADD, 8>(OpcodeArgs);
|
||||
template
|
||||
void OpDispatchBuilder::AVXVectorALUOp<IR::OP_VUQADD, 1>(OpcodeArgs);
|
||||
template
|
||||
void OpDispatchBuilder::AVXVectorALUOp<IR::OP_VUQADD, 2>(OpcodeArgs);
|
||||
template
|
||||
void OpDispatchBuilder::AVXVectorALUOp<IR::OP_VSUB, 1>(OpcodeArgs);
|
||||
template
|
||||
void OpDispatchBuilder::AVXVectorALUOp<IR::OP_VSUB, 2>(OpcodeArgs);
|
||||
|
@ -215,7 +215,7 @@ void InitializeVEXTables() {
|
||||
{OPD(1, 0b01, 0xDA), 1, X86InstInfo{"VPMINUB", TYPE_INST, FLAGS_MODRM | FLAGS_XMM_FLAGS, 0, nullptr}},
|
||||
{OPD(1, 0b01, 0xDB), 1, X86InstInfo{"VPAND", TYPE_INST, GenFlagsSameSize(SIZE_128BIT) | FLAGS_MODRM | FLAGS_VEX_1ST_SRC | FLAGS_XMM_FLAGS, 0, nullptr}},
|
||||
{OPD(1, 0b01, 0xDC), 1, X86InstInfo{"VPADDUSB", TYPE_INST, GenFlagsSameSize(SIZE_128BIT) | FLAGS_MODRM | FLAGS_VEX_1ST_SRC | FLAGS_XMM_FLAGS, 0, nullptr}},
|
||||
{OPD(1, 0b01, 0xDD), 1, X86InstInfo{"VPADDUSW", TYPE_INST, FLAGS_MODRM | FLAGS_XMM_FLAGS, 0, nullptr}},
|
||||
{OPD(1, 0b01, 0xDD), 1, X86InstInfo{"VPADDUSW", TYPE_INST, GenFlagsSameSize(SIZE_128BIT) | FLAGS_MODRM | FLAGS_VEX_1ST_SRC | FLAGS_XMM_FLAGS, 0, nullptr}},
|
||||
{OPD(1, 0b01, 0xDE), 1, X86InstInfo{"VPMAXUB", TYPE_INST, FLAGS_MODRM | FLAGS_XMM_FLAGS, 0, nullptr}},
|
||||
{OPD(1, 0b01, 0xDF), 1, X86InstInfo{"VPANDN", TYPE_INST, GenFlagsSameSize(SIZE_128BIT) | FLAGS_MODRM | FLAGS_VEX_1ST_SRC | FLAGS_XMM_FLAGS, 0, nullptr}},
|
||||
|
||||
|
41
unittests/ASM/VEX/vpaddusw.asm
Normal file
41
unittests/ASM/VEX/vpaddusw.asm
Normal file
@ -0,0 +1,41 @@
|
||||
%ifdef CONFIG
|
||||
{
|
||||
"HostFeatures": ["AVX"],
|
||||
"RegData": {
|
||||
"XMM0": ["0xF142434445464748", "0x5152535455565758", "0xF142434445464748", "0x5152535455565758"],
|
||||
"XMM1": ["0x6162636465666768", "0x7172737475767778", "0x6162636465666768", "0x7172737475767778"],
|
||||
"XMM2": ["0xFFFFA6A8AAACAEB0", "0xC2C4C6C8CACCCED0", "0x0000000000000000", "0x0000000000000000"],
|
||||
"XMM3": ["0xFFFFA6A8AAACAEB0", "0xC2C4C6C8CACCCED0", "0xFFFFA6A8AAACAEB0", "0xC2C4C6C8CACCCED0"],
|
||||
"XMM4": ["0xFFFFA6A8AAACAEB0", "0xC2C4C6C8CACCCED0", "0x0000000000000000", "0x0000000000000000"],
|
||||
"XMM5": ["0xFFFFA6A8AAACAEB0", "0xC2C4C6C8CACCCED0", "0xFFFFA6A8AAACAEB0", "0xC2C4C6C8CACCCED0"]
|
||||
},
|
||||
"MemoryRegions": {
|
||||
"0x100000000": "4096"
|
||||
}
|
||||
}
|
||||
%endif
|
||||
|
||||
lea rdx, [rel .data]
|
||||
|
||||
vmovaps ymm0, [rdx]
|
||||
vmovaps ymm1, [rdx + 32]
|
||||
|
||||
vpaddusw xmm2, xmm0, xmm1
|
||||
vpaddusw ymm3, ymm0, ymm1
|
||||
|
||||
vpaddusw xmm4, xmm0, [rdx + 32]
|
||||
vpaddusw ymm5, ymm0, [rdx + 32]
|
||||
|
||||
hlt
|
||||
|
||||
align 32
|
||||
.data:
|
||||
dq 0xF142434445464748
|
||||
dq 0x5152535455565758
|
||||
dq 0xF142434445464748
|
||||
dq 0x5152535455565758
|
||||
|
||||
dq 0x6162636465666768
|
||||
dq 0x7172737475767778
|
||||
dq 0x6162636465666768
|
||||
dq 0x7172737475767778
|
Loading…
x
Reference in New Issue
Block a user