2025-04-15 22:20:46 +03:00
|
|
|
# IDIV instruction tests
|
|
|
|
# Format: RawBytes;Instructions
|
|
|
|
RawBytes;Instructions
|
|
|
|
|
|
|
|
# IDIV r/m8 (opcode F6 /7)
|
|
|
|
F6F8;[{ "Type": "IDiv", "Operands": ["al"] }]
|
|
|
|
F6FB;[{ "Type": "IDiv", "Operands": ["bl"] }]
|
|
|
|
F6F9;[{ "Type": "IDiv", "Operands": ["cl"] }]
|
|
|
|
F6FA;[{ "Type": "IDiv", "Operands": ["dl"] }]
|
|
|
|
|
|
|
|
# IDIV r/m32 (opcode F7 /7)
|
|
|
|
F7F8;[{ "Type": "IDiv", "Operands": ["eax"] }]
|
|
|
|
F7FB;[{ "Type": "IDiv", "Operands": ["ebx"] }]
|
|
|
|
F7F9;[{ "Type": "IDiv", "Operands": ["ecx"] }]
|
|
|
|
F7FA;[{ "Type": "IDiv", "Operands": ["edx"] }]
|
|
|
|
F7FC;[{ "Type": "IDiv", "Operands": ["esp"] }]
|
|
|
|
F7FD;[{ "Type": "IDiv", "Operands": ["ebp"] }]
|
|
|
|
F7FE;[{ "Type": "IDiv", "Operands": ["esi"] }]
|
|
|
|
F7FF;[{ "Type": "IDiv", "Operands": ["edi"] }]
|
|
|
|
|
|
|
|
# IDIV with memory operands
|
2025-04-16 21:16:31 +03:00
|
|
|
|
|
|
|
# SPECIAL CASE: When using SIB byte with Base=101 (EBP) and Mod=00, it requires a 32-bit displacement
|
|
|
|
# The correct encoding for "IDIV byte ptr [eax]" would be F638 (with Mod=00, R/M=0 for EAX)
|
|
|
|
# F63C25;[{ "Type": "IDiv", "Operands": ["byte ptr [eax]"] }]
|
|
|
|
F638;[{ "Type": "IDiv", "Operands": ["byte ptr [eax]"] }]
|
|
|
|
|
|
|
|
# The correct encoding for "IDIV dword ptr [eax]" would be F738 (with Mod=00, R/M=0 for EAX)
|
|
|
|
# F73C25;[{ "Type": "IDiv", "Operands": ["dword ptr [eax]"] }]
|
|
|
|
F738;[{ "Type": "IDiv", "Operands": ["dword ptr [eax]"] }]
|
|
|
|
|
|
|
|
# The correct encoding for "IDIV dword ptr [eax+0x10]" would be F74010 (with Mod=01, R/M=0 for EAX, disp8=0x10)
|
|
|
|
# F73C2510000000;[{ "Type": "IDiv", "Operands": ["dword ptr [eax+0x10]"] }]
|
|
|
|
F74010;[{ "Type": "IDiv", "Operands": ["dword ptr [eax+0x10]"] }]
|