0
mirror of https://github.com/sampletext32/ParkanPlayground.git synced 2025-06-19 16:08:02 +03:00

Added support for far call instructions and PUSH imm16. Fixed invalid test cases in call_tests.csv and or_tests.csv

This commit is contained in:
bird_egop
2025-04-16 21:44:02 +03:00
parent 089fe4dfd4
commit fa1a7f582c
7 changed files with 304 additions and 4 deletions

View File

@ -68,7 +68,14 @@ FF549DFF;[{ "Type": "Call", "Operands": ["dword ptr [ebp+ebx*4-0x01]"] }]
# CALL m16:32 (opcode FF /3) - Far call with memory operand
FF1C;[{ "Type": "Call", "Operands": ["fword ptr [esp]"] }]
FF1D;[{ "Type": "Call", "Operands": ["fword ptr [ebp]"] }]
# SPECIAL CASE in x86 encoding:
# When Mod=00 and R/M=101 (EBP), this doesn't actually refer to [EBP] but instead indicates
# a 32-bit displacement-only addressing mode. The correct encoding for "Call fword ptr [ebp]"
# would be FF5D00 which is "Call fword ptr [ebp+0x0]"
# FF1D;[{ "Type": "Call", "Operands": ["fword ptr [ebp]"] }]
# Correct encoding for "Call fword ptr [ebp]" with displacement 0
FF5D00;[{ "Type": "Call", "Operands": ["fword ptr [ebp+0x0]"] }]
FF1E;[{ "Type": "Call", "Operands": ["fword ptr [esi]"] }]
FF1F;[{ "Type": "Call", "Operands": ["fword ptr [edi]"] }]
FF18;[{ "Type": "Call", "Operands": ["fword ptr [eax]"] }]

Can't render this file because it contains an unexpected character in line 6 and column 15.

View File

@ -12,7 +12,12 @@ RawBytes;Instructions
83C842;[{ "Type": "Or", "Operands": ["eax", "0x42"] }]
# OR with memory operands
810C2578563412;[{ "Type": "Or", "Operands": ["dword ptr [eax]", "0x12345678"] }]
# INVALID TEST: The following test has an invalid encoding.
# When ModR/M byte has R/M=100 (ESP), a SIB byte is required.
# 810C2578563412;[{ "Type": "Or", "Operands": ["dword ptr [eax]", "0x12345678"] }]
# Correct encoding for "Or dword ptr [eax], 0x12345678"
810878563412;[{ "Type": "Or", "Operands": ["dword ptr [eax]", "0x12345678"] }]
# OR r/m32, r32 (opcode 09)
09D8;[{ "Type": "Or", "Operands": ["eax", "ebx"] }]

Can't render this file because it contains an unexpected character in line 6 and column 11.