mirror of
https://github.com/FEX-Emu/FEX.git
synced 2025-01-08 22:52:51 +00:00
OpcodeDispatcher: Handle VPSUBUSB
This commit is contained in:
parent
d9176114c5
commit
6f474cedd3
@ -5913,6 +5913,7 @@ void OpDispatchBuilder::InstallHostSpecificOpcodeHandlers() {
|
||||
{OPD(1, 0b01, 0xD6), 1, &OpDispatchBuilder::MOVQOp},
|
||||
{OPD(1, 0b01, 0xD7), 1, &OpDispatchBuilder::UnimplementedOp},
|
||||
|
||||
{OPD(1, 0b01, 0xD8), 1, &OpDispatchBuilder::AVXVectorALUOp<IR::OP_VUQSUB, 1>},
|
||||
{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>},
|
||||
|
@ -432,6 +432,8 @@ template
|
||||
void OpDispatchBuilder::AVXVectorALUOp<IR::OP_VSUB, 4>(OpcodeArgs);
|
||||
template
|
||||
void OpDispatchBuilder::AVXVectorALUOp<IR::OP_VSUB, 8>(OpcodeArgs);
|
||||
template
|
||||
void OpDispatchBuilder::AVXVectorALUOp<IR::OP_VUQSUB, 1>(OpcodeArgs);
|
||||
|
||||
template
|
||||
void OpDispatchBuilder::AVXVectorALUOp<IR::OP_VCMPEQ, 1>(OpcodeArgs);
|
||||
|
@ -210,7 +210,7 @@ void InitializeVEXTables() {
|
||||
{OPD(1, 0b01, 0xD6), 1, X86InstInfo{"VMOVQ", TYPE_INST, GenFlagsSameSize(SIZE_64BIT) | FLAGS_MODRM | FLAGS_SF_MOD_DST | FLAGS_XMM_FLAGS, 0, nullptr}},
|
||||
{OPD(1, 0b01, 0xD7), 1, X86InstInfo{"VPMOVMSKB", TYPE_INST, FLAGS_MODRM | FLAGS_XMM_FLAGS | FLAGS_SF_DST_GPR | FLAGS_SF_MOD_REG_ONLY, 0, nullptr}},
|
||||
|
||||
{OPD(1, 0b01, 0xD8), 1, X86InstInfo{"VPSUBUSB", TYPE_INST, FLAGS_MODRM | FLAGS_XMM_FLAGS, 0, nullptr}},
|
||||
{OPD(1, 0b01, 0xD8), 1, X86InstInfo{"VPSUBUSB", TYPE_INST, GenFlagsSameSize(SIZE_128BIT) | FLAGS_MODRM | FLAGS_VEX_1ST_SRC | FLAGS_XMM_FLAGS, 0, nullptr}},
|
||||
{OPD(1, 0b01, 0xD9), 1, X86InstInfo{"VPSUBUSW", TYPE_INST, FLAGS_MODRM | FLAGS_XMM_FLAGS, 0, nullptr}},
|
||||
{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}},
|
||||
|
41
unittests/ASM/VEX/vpsubusb.asm
Normal file
41
unittests/ASM/VEX/vpsubusb.asm
Normal file
@ -0,0 +1,41 @@
|
||||
%ifdef CONFIG
|
||||
{
|
||||
"HostFeatures": ["AVX"],
|
||||
"RegData": {
|
||||
"XMM0": ["0x6162636445464748", "0x5152535455565758", "0x6162636445464748", "0x5152535455565758"],
|
||||
"XMM1": ["0x4142434465666768", "0x7172737475767778", "0x4142434465666768", "0x7172737475767778"],
|
||||
"XMM2": ["0x2020202000000000", "0x0000000000000000", "0x0000000000000000", "0x0000000000000000"],
|
||||
"XMM3": ["0x2020202000000000", "0x0000000000000000", "0x2020202000000000", "0x0000000000000000"],
|
||||
"XMM4": ["0x2020202000000000", "0x0000000000000000", "0x0000000000000000", "0x0000000000000000"],
|
||||
"XMM5": ["0x2020202000000000", "0x0000000000000000", "0x2020202000000000", "0x0000000000000000"]
|
||||
},
|
||||
"MemoryRegions": {
|
||||
"0x100000000": "4096"
|
||||
}
|
||||
}
|
||||
%endif
|
||||
|
||||
lea rdx, [rel .data]
|
||||
|
||||
vmovaps ymm0, [rdx]
|
||||
vmovaps ymm1, [rdx + 32]
|
||||
|
||||
vpsubusb xmm2, xmm0, xmm1
|
||||
vpsubusb ymm3, ymm0, ymm1
|
||||
|
||||
vpsubusb xmm4, xmm0, [rdx + 32]
|
||||
vpsubusb ymm5, ymm0, [rdx + 32]
|
||||
|
||||
hlt
|
||||
|
||||
align 32
|
||||
.data:
|
||||
dq 0x6162636445464748
|
||||
dq 0x5152535455565758
|
||||
dq 0x6162636445464748
|
||||
dq 0x5152535455565758
|
||||
|
||||
dq 0x4142434465666768
|
||||
dq 0x7172737475767778
|
||||
dq 0x4142434465666768
|
||||
dq 0x7172737475767778
|
Loading…
Reference in New Issue
Block a user