# MUL instruction tests # Format: RawBytes;Instructions RawBytes;Instructions # MUL r/m8 (opcode F6 /4) F6E0;[{ "Type": "Mul", "Operands": ["al"] }] F6E3;[{ "Type": "Mul", "Operands": ["bl"] }] F6E1;[{ "Type": "Mul", "Operands": ["cl"] }] F6E2;[{ "Type": "Mul", "Operands": ["dl"] }] # MUL r/m32 (opcode F7 /4) F7E0;[{ "Type": "Mul", "Operands": ["eax"] }] F7E3;[{ "Type": "Mul", "Operands": ["ebx"] }] F7E1;[{ "Type": "Mul", "Operands": ["ecx"] }] F7E2;[{ "Type": "Mul", "Operands": ["edx"] }] F7E4;[{ "Type": "Mul", "Operands": ["esp"] }] F7E5;[{ "Type": "Mul", "Operands": ["ebp"] }] F7E6;[{ "Type": "Mul", "Operands": ["esi"] }] F7E7;[{ "Type": "Mul", "Operands": ["edi"] }] # MUL with memory operands # SPECIAL CASE: When using SIB byte with Base=101 (EBP) and Mod=00, it requires a 32-bit displacement # The correct encoding for "MUL byte ptr [eax]" would be F620 (with Mod=00, R/M=0 for EAX) # F62425;[{ "Type": "Mul", "Operands": ["byte ptr [eax]"] }] F620;[{ "Type": "Mul", "Operands": ["byte ptr [eax]"] }] # The correct encoding for "MUL dword ptr [eax]" would be F720 (with Mod=00, R/M=0 for EAX) # F72425;[{ "Type": "Mul", "Operands": ["dword ptr [eax]"] }] F720;[{ "Type": "Mul", "Operands": ["dword ptr [eax]"] }] # This test case has an issue - it should be a direct memory operand with a displacement # F7242510000000;[{ "Type": "Mul", "Operands": ["dword ptr [0x10]"] }] # The correct encoding for "MUL dword ptr [0x10]" would be F72510000000 (with Mod=00, R/M=5 for direct addressing) F72510000000;[{ "Type": "Mul", "Operands": ["dword ptr [0x10]"] }]