mirror of
https://github.com/FEX-Emu/FEX.git
synced 2025-01-27 01:04:55 +00:00
Merge pull request #21 from Sonicadvance1/movshdup
Implements Movshdup instruction
This commit is contained in:
commit
0e80dc27cc
@ -2382,6 +2382,15 @@ void OpDispatchBuilder::MOVLPOp(OpcodeArgs) {
|
||||
}
|
||||
}
|
||||
|
||||
void OpDispatchBuilder::MOVSHDUPOp(OpcodeArgs) {
|
||||
OrderedNode *Src = LoadSource(FPRClass, Op, Op->Src[0], Op->Flags, 8);
|
||||
OrderedNode *Result = _VInsElement(16, 4, 3, 3, Src, Src);
|
||||
Result = _VInsElement(16, 4, 2, 3, Result, Src);
|
||||
Result = _VInsElement(16, 4, 1, 1, Result, Src);
|
||||
Result = _VInsElement(16, 4, 0, 1, Result, Src);
|
||||
StoreResult(FPRClass, Op, Result, -1);
|
||||
}
|
||||
|
||||
void OpDispatchBuilder::MOVSSOp(OpcodeArgs) {
|
||||
if (Op->Dest.TypeNone.Type == FEXCore::X86Tables::DecodedOperand::TYPE_GPR &&
|
||||
Op->Src[0].TypeNone.Type == FEXCore::X86Tables::DecodedOperand::TYPE_GPR) {
|
||||
@ -4741,6 +4750,7 @@ void InstallOpcodeHandlers() {
|
||||
|
||||
const std::vector<std::tuple<uint8_t, uint8_t, FEXCore::X86Tables::OpDispatchPtr>> RepModOpTable = {
|
||||
{0x10, 2, &OpDispatchBuilder::MOVSSOp},
|
||||
{0x16, 1, &OpDispatchBuilder::MOVSHDUPOp},
|
||||
{0x19, 7, &OpDispatchBuilder::NOPOp},
|
||||
{0x2A, 1, &OpDispatchBuilder::CVT<4, true>},
|
||||
{0x2C, 1, &OpDispatchBuilder::FCVT<4, true>},
|
||||
|
@ -185,6 +185,7 @@ public:
|
||||
void MOVUPSOp(OpcodeArgs);
|
||||
void MOVLHPSOp(OpcodeArgs);
|
||||
void MOVLPOp(OpcodeArgs);
|
||||
void MOVSHDUPOp(OpcodeArgs);
|
||||
void MOVHPDOp(OpcodeArgs);
|
||||
void MOVSDOp(OpcodeArgs);
|
||||
template<FEXCore::IR::IROps IROp, size_t ElementSize>
|
||||
|
32
unittests/ASM/REP/F3_16.asm
Normal file
32
unittests/ASM/REP/F3_16.asm
Normal file
@ -0,0 +1,32 @@
|
||||
%ifdef CONFIG
|
||||
{
|
||||
"RegData": {
|
||||
"XMM0": ["0x4142434441424344", "0x5152535451525354"],
|
||||
"XMM1": ["0x4142434441424344", "0x5152535451525354"]
|
||||
},
|
||||
"MemoryRegions": {
|
||||
"0x100000000": "4096"
|
||||
}
|
||||
}
|
||||
%endif
|
||||
|
||||
mov rdx, 0xe0000000
|
||||
|
||||
mov rax, 0x4142434445464748
|
||||
mov [rdx + 8 * 0], rax
|
||||
mov rax, 0x5152535455565758
|
||||
mov [rdx + 8 * 1], rax
|
||||
|
||||
mov rax, 0x6162633265666768
|
||||
mov [rdx + 8 * 2], rax
|
||||
mov rax, 0x7172737475767778
|
||||
mov [rdx + 8 * 3], rax
|
||||
|
||||
movapd xmm2, [rdx + 8 * 0]
|
||||
movapd xmm0, [rdx + 8 * 2]
|
||||
movapd xmm1, [rdx + 8 * 2]
|
||||
|
||||
movshdup xmm0, xmm2
|
||||
movshdup xmm1, [rdx + 8 * 0]
|
||||
|
||||
hlt
|
Loading…
x
Reference in New Issue
Block a user