bird_egop
b210764caa
Removed duplicate AND handler and added detailed opcode comments to XOR handlers. Fixed potential naming inconsistencies in handler registrations.
2025-04-16 21:25:46 +03:00
bird_egop
e8955b1ebd
Improved code documentation in InstructionHandlerFactory. Added detailed opcode comments to handler registration lines and fixed duplicate handler registrations in RegisterAllHandlers method.
2025-04-16 21:24:09 +03:00
bird_egop
9096267f73
Added OrRm32R32Handler for OR r/m32, r32 (opcode 09) instruction and registered it in InstructionHandlerFactory. This fixes failing OR instruction tests.
2025-04-16 21:20:40 +03:00
bird_egop
eac8e9ea69
Fixed NOT instruction tests with SIB byte encoding. Corrected memory addressing encodings for [eax] and displacement addressing.
2025-04-16 21:17:48 +03:00
bird_egop
226ec25549
Fixed DIV and IDIV instruction tests with SIB byte encoding. Corrected memory addressing encodings for [eax], [ebp], and displacement addressing.
2025-04-16 21:16:31 +03:00
bird_egop
9da33e12c4
Fixed IMUL instruction tests with SIB byte encoding. When using SIB byte with Base=101 (EBP) and Mod=00, it requires a 32-bit displacement. Replaced incorrect encodings with proper ones for [eax] addressing.
2025-04-16 21:11:47 +03:00
bird_egop
800915b534
new handlers and test fixes
2025-04-16 20:54:08 +03:00
bird_egop
f654f64c71
Created dedicated Mul namespace for MUL instruction handlers. Implemented MulRm8Handler for MUL r/m8 instruction (opcode F6 /4) and moved MulRm32Handler to the new namespace. Updated InstructionHandlerFactory to register both handlers.
2025-04-16 20:43:06 +03:00
bird_egop
be2dfc3dc5
Fixed MUL instruction tests with SIB byte encoding. When using SIB byte with Base=101 (EBP) and Mod=00, it requires a 32-bit displacement. Replaced incorrect encodings with proper ones for [eax] and direct memory addressing.
2025-04-16 20:40:18 +03:00
bird_egop
72ad1c0d90
Fixed NEG instruction tests with SIB byte encoding. When using SIB byte with Base=101 (EBP) and Mod=00, it requires a 32-bit displacement. Replaced incorrect encodings with proper ones for [eax] addressing.
2025-04-16 20:37:46 +03:00
bird_egop
d2279f4720
Added NegRm8Handler for NEG r/m8 instruction (opcode F6 /3). Registered the new handler in InstructionHandlerFactory.
2025-04-16 20:29:26 +03:00
bird_egop
f702e9da84
Fixed special case in MOV tests with EBP addressing. When Mod=00 and R/M=101 (EBP), it indicates a 32-bit displacement-only addressing mode, not [EBP]. Added correct test cases with Mod=01 and zero displacement.
2025-04-16 20:27:00 +03:00
bird_egop
41a4e5884d
Fixed special case in INC/DEC tests with EBP addressing. When Mod=00 and R/M=101 (EBP), it indicates a 32-bit displacement-only addressing mode, not [EBP]. Added correct test cases with Mod=01 and zero displacement.
2025-04-16 20:18:14 +03:00
bird_egop
58b739d922
Fixed special case in LEA test with EBP addressing. When Mod=00 and R/M=101 (EBP), it indicates a 32-bit displacement-only addressing mode, not [EBP]. Added correct test case with Mod=01 and zero displacement.
2025-04-16 20:16:31 +03:00
bird_egop
a474c4b7e4
Fixed invalid test cases in x86 disassembler tests. Added comments explaining special cases in x86 encoding and added valid test cases for LEA with different destination registers.
2025-04-16 20:13:07 +03:00
bird_egop
09786b781b
Added detailed comments to test files explaining x86 encoding special cases: 1) Mod=00 and R/M=101 (EBP) for displacement-only addressing, 2) Mod=00 and R/M=100 (ESP) for SIB byte requirement, 3) SIB byte with EBP as base register special cases
2025-04-16 19:58:34 +03:00
bird_egop
e5b63270b6
Added detailed comments explaining x86 ModR/M special cases: 1) Mod=00 and R/M=101 (EBP) for displacement-only addressing, 2) Mod=00 and R/M=100 (ESP) for SIB byte requirement
2025-04-16 19:54:15 +03:00
bird_egop
154e811d2d
Added JmpRm32Handler for JMP r/m32 instructions (opcode FF /4)
2025-04-16 19:50:00 +03:00
bird_egop
bc6d32a725
Fixed JP and JNP instruction types in TwoByteConditionalJumpHandler
2025-04-16 19:44:37 +03:00
bird_egop
db96af74ff
Fixed several instruction handling issues: 1) Added proper handling for zero displacements in memory operands, 2) Fixed large unsigned displacement values display, 3) Added CmpEaxImmHandler for CMP EAX, imm32 instruction, 4) Fixed JP and JNP conditional jump instruction types
2025-04-16 19:43:03 +03:00
bird_egop
193f9cd2d8
refactor modrm decoder more
2025-04-16 19:14:11 +03:00
bird_egop
a91d6af8fc
Refactored ModRMDecoder class into smaller, more focused components. Created RegisterMapper and SIBDecoder classes to improve maintainability.
2025-04-16 19:11:36 +03:00
bird_egop
9445fb225f
fixes and removed unused code
2025-04-16 19:07:32 +03:00
bird_egop
9ddaa02471
Fixed ModRM handling for 8-bit operands with SIB byte. Updated test to match implementation.
2025-04-16 18:42:15 +03:00
bird_egop
deb98183b1
more fixes
2025-04-16 18:32:41 +03:00
bird_egop
6719cff2af
Test fixes
2025-04-16 18:30:17 +03:00
bird_egop
d4eb920e2f
Updated instruction handlers to use factory methods instead of directly setting Size property
2025-04-16 01:39:23 +03:00
bird_egop
e06ea2beb3
Refactored register operands to separate 8-bit registers into dedicated Register8Operand class
2025-04-16 01:10:33 +03:00
bird_egop
46592d4877
fix various tests
2025-04-15 23:54:51 +03:00
bird_egop
4327464b98
add new add handlers
2025-04-15 23:54:37 +03:00
bird_egop
0dac4481f6
fix segment override tests according to ghidra
2025-04-15 23:22:14 +03:00
bird_egop
6882f0bd86
Update TestDataProvider to use CSV files directly from filesystem instead of embedded resources
2025-04-15 23:21:52 +03:00
bird_egop
61e92a50a5
Split FPU tests by instruction type for better organization and readability
2025-04-15 22:45:46 +03:00
bird_egop
0a2d551cb4
Enhanced test coverage for floating-point instructions
2025-04-15 22:40:09 +03:00
bird_egop
904f0eed47
Enhanced test coverage for DIV, flag control, and FNSTSW instructions
2025-04-15 22:35:14 +03:00
bird_egop
6169d68967
Enhanced test coverage for CMP, BIT and CALL instructions
2025-04-15 22:32:37 +03:00
bird_egop
d6903f2e5b
Enhanced test coverage for AND instructions
2025-04-15 22:28:54 +03:00
bird_egop
2fde1f2ae3
Enhanced test coverage for ADC and ADD instructions
2025-04-15 22:27:51 +03:00
bird_egop
2123ed2c5d
add tons of tests
2025-04-15 22:20:46 +03:00
bird_egop
abe4d38d4b
more cleanup
2025-04-15 02:42:47 +03:00
bird_egop
49f1d7d221
cleanup
2025-04-15 02:32:14 +03:00
bird_egop
3ea327064a
Fix x86 disassembler issues with direct memory addressing and immediate value formatting
2025-04-15 02:29:32 +03:00
bird_egop
d351f41808
Fixed x86 disassembler issues: 1) Corrected ModRMDecoder to use RegisterIndex.Sp instead of RegisterIndex.Si for SIB detection 2) Updated floating point instruction handlers to use proper instruction types 3) Enhanced ImmediateOperand.ToString() to show full 32-bit representation for sign-extended values
2025-04-15 00:14:28 +03:00
bird_egop
9117830ff1
unbreak tests
2025-04-14 23:08:52 +03:00
bird_egop
685eeda03d
Updated instruction handlers to use Type and StructuredOperands instead of Mnemonic and Operands
2025-04-14 22:09:05 +03:00
bird_egop
c516e063e7
basic decompiler and fixes
2025-04-14 02:07:17 +03:00
bird_egop
157171fa90
remove more special cases. use standardized api
2025-04-14 01:52:33 +03:00
bird_egop
c9e854a663
remove direct position changes from modrmdecoder
2025-04-14 01:15:26 +03:00
bird_egop
99b93523a4
more refactoring
2025-04-14 01:08:14 +03:00
bird_egop
f54dc10596
Simplified XorImmWithRm16Handler by improving boundary checking and removing redundant code
2025-04-14 01:01:31 +03:00
bird_egop
4567465570
Simplified TestRegMemHandler by improving boundary checking and removing redundant code
2025-04-14 00:56:57 +03:00
bird_egop
d3d2c4c63f
Simplified TestRegMem8Handler by removing unused variables and improving code structure
2025-04-14 00:54:16 +03:00
bird_egop
b7c6092b7f
Simplified TEST instruction handlers by removing special cases and improving code structure
2025-04-14 00:53:16 +03:00
bird_egop
dae52fc3ec
Simplified SubImmFromRm32SignExtendedHandler by removing special case for operand type-based formatting
2025-04-14 00:41:58 +03:00
bird_egop
5b09d6f9b8
Simplified SubImmFromRm16SignExtendedHandler by removing special case for register name conversion
2025-04-14 00:39:58 +03:00
bird_egop
689195c6e5
Simplified SubImmFromRm16Handler by removing special case for register name conversion and improving boundary checking
2025-04-14 00:38:47 +03:00
bird_egop
e134452eda
Improved PUSH handlers by moving reg field check to CanHandle and adding proper boundary checking
2025-04-14 00:33:39 +03:00
bird_egop
53696a9f1c
Removed special case check for 0x83 in OrRm8R8Handler to avoid introducing special cases in general solutions
2025-04-14 00:30:53 +03:00
bird_egop
243789892d
Further simplified MultiByteNopHandler by using an array of tuples and matching patterns from longest to shortest
2025-04-14 00:23:58 +03:00
bird_egop
4b549f4b1b
Simplified MultiByteNopHandler by using a dictionary-based approach to replace complex conditional logic
2025-04-14 00:21:24 +03:00
bird_egop
c9901aa9b8
Simplified MovRm32Imm32Handler by improving boundary checking and error handling, and updated test to match expected behavior
2025-04-14 00:19:36 +03:00
bird_egop
2d0f701dd1
Simplified TwoByteConditionalJumpHandler and MovRegMemHandler by improving boundary checking and target address calculation
2025-04-14 00:17:31 +03:00
bird_egop
996be18172
Simplified JmpRel32Handler by improving target address calculation and code organization
2025-04-14 00:11:55 +03:00
bird_egop
38770de005
Simplified jump instruction handlers by using consistent decoder methods and improving code organization
2025-04-14 00:09:44 +03:00
bird_egop
5daab494e1
Simplified LoadStoreInt32Handler by replacing if-else logic with a dictionary-based approach
2025-04-14 00:00:30 +03:00
bird_egop
fac1339fec
Simplified LoadStoreInt16Handler by replacing complex logic with a dictionary-based approach and improving memory operand handling
2025-04-13 23:53:27 +03:00
bird_egop
4e837f5c63
Simplified LoadStoreFloat64Handler by replacing if-else logic with a dictionary-based approach
2025-04-13 23:52:00 +03:00
bird_egop
b531db77d5
Simplified LoadStoreControlHandler by replacing complex switch statements with a dictionary-based approach
2025-04-13 23:50:23 +03:00
bird_egop
0ff20494e1
Simplified Int32OperationHandler by replacing complex if-else logic with a dictionary-based approach
2025-04-13 23:48:45 +03:00
bird_egop
46a4696481
Simplified Int16OperationHandler by replacing complex if-else logic with a dictionary-based approach
2025-04-13 23:47:10 +03:00
bird_egop
7ab388f26d
Simplified FnstswHandler by using CanReadByte for boundary checking and improving code readability
2025-04-13 23:45:26 +03:00
bird_egop
ec1aa4a124
Simplified CmpImmWithRm8Handler by removing unnecessary raw bytes handling and improving operand formatting
2025-04-13 23:41:30 +03:00
bird_egop
ec70b31058
Simplified CmpImmWithRm32Handler and added AndImmWithRm32Handler
2025-04-13 23:39:57 +03:00
bird_egop
8d1522b6cb
Added XML documentation comments to buffer reading methods in InstructionDecoder
2025-04-13 23:36:53 +03:00
bird_egop
6827cb735e
Simplified StringInstructionHandler by combining mnemonic and operands into a single dictionary and removing redundant switch statement
2025-04-13 23:24:14 +03:00
bird_egop
00547ed273
simplify reading logic
2025-04-13 23:22:30 +03:00
bird_egop
0ea3294c61
Simplified AndImmToRm32SignExtendedHandler for better maintainability and consistency
2025-04-13 23:18:38 +03:00
bird_egop
f19f2254fe
Simplified AndImmToRm8Handler for better maintainability and consistency
2025-04-13 23:16:34 +03:00
bird_egop
cf1e1acf71
Simplified instruction handlers for better maintainability and consistency. Fixed operand size handling in XOR handlers with 16-bit registers. Added support for 6-byte NOP variant. Fixed formatting of immediate values to maintain consistent output.
2025-04-13 23:15:11 +03:00
bird_egop
11a2cfada4
nice big refactor
2025-04-13 23:06:52 +03:00
bird_egop
59df064ca4
broken tests
2025-04-13 20:20:51 +03:00
bird_egop
89b2b32cd6
fix xor AX, 16bit imm
2025-04-13 19:55:13 +03:00
bird_egop
b0ade45f1b
refactor xors
2025-04-13 19:35:28 +03:00
bird_egop
30676b36a1
Updated InstructionHandlerFactory to register XOR handlers and updated test project files
2025-04-13 19:28:56 +03:00
bird_egop
56c12b552c
Fixed XOR instruction handlers for consistent immediate value handling
2025-04-13 19:26:08 +03:00
bird_egop
e91a0223f7
Refactor SUB handlers
2025-04-13 18:22:44 +03:00
bird_egop
a04a16af7d
Updated NOP instruction handlers to match Ghidra's output format
2025-04-13 18:09:13 +03:00
bird_egop
8cf26060f2
Implemented NOP instruction handlers for multi-byte NOP variants
2025-04-13 18:00:26 +03:00
bird_egop
032030169e
Added comprehensive test cases for SUB instructions with complex addressing modes
2025-04-13 17:55:29 +03:00
bird_egop
b11b39ac4e
Implemented 16-bit SUB instruction handlers and fixed test data
2025-04-13 17:51:54 +03:00
bird_egop
d1d52af511
Added CSV test files for various instruction types and enabled comments in CSV files
2025-04-13 17:17:28 +03:00
bird_egop
3f4b9a8547
Optimized HexStringToByteArray method using spans for better performance
2025-04-13 17:07:09 +03:00
bird_egop
2cdd9f1e83
move tests to csv
2025-04-13 17:02:46 +03:00
bird_egop
565158d9bd
Fixed immediate value formatting in Group1 instruction handlers
2025-04-13 16:00:46 +03:00
bird_egop
2c85192d13
Fixed byte order handling in SUB instruction handlers and updated tests
...
Implemented SUB r32, r/m32 instruction handlers and tests
Added comprehensive tests for Push/Pop, Xchg, Sub instructions and enhanced segment override tests
2025-04-13 14:36:49 +03:00
bird_egop
44c73321ea
move handlers to respective folders
2025-04-13 04:13:44 +03:00
bird_egop
e8a16e7ecd
Moved AND instruction handlers from ArithmeticImmediate to dedicated And namespace for better organization
2025-04-13 04:11:06 +03:00
bird_egop
af94b88868
Added comprehensive test coverage for arithmetic and logical instructions. Implemented AND instruction handlers and added tests for ADC, SBB, and arithmetic unary operations.
2025-04-13 04:07:37 +03:00
bird_egop
b215908d76
fixups
2025-04-13 03:56:39 +03:00
bird_egop
611dce32e5
Fixed operand order in MOV instructions and updated tests to match disassembler output
2025-04-13 03:56:09 +03:00