mirror of
https://github.com/FEX-Emu/FEX.git
synced 2025-02-16 04:47:32 +00:00
OpcodeDispatcher: Handle VMAXPD
This commit is contained in:
parent
b7e177c11c
commit
3590f090c7
@ -5874,6 +5874,7 @@ void OpDispatchBuilder::InstallHostSpecificOpcodeHandlers() {
|
||||
{OPD(1, 0b11, 0x5D), 1, &OpDispatchBuilder::AVXVectorScalarALUOp<IR::OP_VFMIN, 8>},
|
||||
|
||||
{OPD(1, 0b00, 0x5F), 1, &OpDispatchBuilder::AVXVectorALUOp<IR::OP_VFMAX, 4>},
|
||||
{OPD(1, 0b01, 0x5F), 1, &OpDispatchBuilder::AVXVectorALUOp<IR::OP_VFMAX, 8>},
|
||||
|
||||
{OPD(1, 0b01, 0x64), 1, &OpDispatchBuilder::AVXVectorALUOp<IR::OP_VCMPGT, 1>},
|
||||
{OPD(1, 0b01, 0x65), 1, &OpDispatchBuilder::AVXVectorALUOp<IR::OP_VCMPGT, 2>},
|
||||
|
@ -445,6 +445,8 @@ void OpDispatchBuilder::AVXVectorALUOp<IR::OP_VFADD, 8>(OpcodeArgs);
|
||||
template
|
||||
void OpDispatchBuilder::AVXVectorALUOp<IR::OP_VFMAX, 4>(OpcodeArgs);
|
||||
template
|
||||
void OpDispatchBuilder::AVXVectorALUOp<IR::OP_VFMAX, 8>(OpcodeArgs);
|
||||
template
|
||||
void OpDispatchBuilder::AVXVectorALUOp<IR::OP_VFMIN, 4>(OpcodeArgs);
|
||||
template
|
||||
void OpDispatchBuilder::AVXVectorALUOp<IR::OP_VFMIN, 8>(OpcodeArgs);
|
||||
|
@ -166,7 +166,7 @@ void InitializeVEXTables() {
|
||||
{OPD(1, 0b11, 0x5E), 1, X86InstInfo{"VDIVSD", TYPE_UNDEC, FLAGS_NONE, 0, nullptr}},
|
||||
|
||||
{OPD(1, 0b00, 0x5F), 1, X86InstInfo{"VMAXPS", TYPE_INST, GenFlagsSameSize(SIZE_128BIT) | FLAGS_MODRM | FLAGS_VEX_1ST_SRC | FLAGS_XMM_FLAGS, 0, nullptr}},
|
||||
{OPD(1, 0b01, 0x5F), 1, X86InstInfo{"VMAXPD", TYPE_UNDEC, FLAGS_NONE, 0, nullptr}},
|
||||
{OPD(1, 0b01, 0x5F), 1, X86InstInfo{"VMAXPD", TYPE_INST, GenFlagsSameSize(SIZE_128BIT) | FLAGS_MODRM | FLAGS_VEX_1ST_SRC | FLAGS_XMM_FLAGS, 0, nullptr}},
|
||||
{OPD(1, 0b10, 0x5F), 1, X86InstInfo{"VMAXSS", TYPE_UNDEC, FLAGS_NONE, 0, nullptr}},
|
||||
{OPD(1, 0b11, 0x5F), 1, X86InstInfo{"VMAXSD", TYPE_UNDEC, FLAGS_NONE, 0, nullptr}},
|
||||
|
||||
|
43
unittests/ASM/VEX/vmaxpd.asm
Normal file
43
unittests/ASM/VEX/vmaxpd.asm
Normal file
@ -0,0 +1,43 @@
|
||||
%ifdef CONFIG
|
||||
{
|
||||
"HostFeatures": ["AVX"],
|
||||
"RegData": {
|
||||
"XMM0": ["0x4008000000000000", "0x4000000000000000", "0x4008000000000000", "0x4000000000000000"],
|
||||
"XMM1": ["0x3FF0000000000000", "0x4008000000000000", "0x3FF0000000000000", "0x4008000000000000"],
|
||||
"XMM2": ["0x4008000000000000", "0x4008000000000000", "0x0000000000000000", "0x0000000000000000"],
|
||||
"XMM3": ["0x4008000000000000", "0x4008000000000000", "0x0000000000000000", "0x0000000000000000"],
|
||||
"XMM4": ["0x4008000000000000", "0x4008000000000000", "0x4008000000000000", "0x4008000000000000"],
|
||||
"XMM5": ["0x4008000000000000", "0x4008000000000000", "0x4008000000000000", "0x4008000000000000"]
|
||||
},
|
||||
"MemoryRegions": {
|
||||
"0x100000000": "4096"
|
||||
}
|
||||
}
|
||||
%endif
|
||||
|
||||
lea rdx, [rel .data]
|
||||
|
||||
vmovapd ymm0, [rdx]
|
||||
vmovapd ymm1, [rdx + 32]
|
||||
|
||||
; Memory operand
|
||||
vmaxpd xmm2, xmm0, [rdx + 32]
|
||||
vmaxpd ymm4, ymm0, [rdx + 32]
|
||||
|
||||
; Register only
|
||||
vmaxpd xmm3, xmm0, xmm1
|
||||
vmaxpd ymm5, ymm1, ymm0
|
||||
|
||||
hlt
|
||||
|
||||
align 32
|
||||
.data:
|
||||
dq 0x4008000000000000
|
||||
dq 0x4000000000000000
|
||||
dq 0x4008000000000000
|
||||
dq 0x4000000000000000
|
||||
|
||||
dq 0x3FF0000000000000
|
||||
dq 0x4008000000000000
|
||||
dq 0x3FF0000000000000
|
||||
dq 0x4008000000000000
|
Loading…
x
Reference in New Issue
Block a user