0
mirror of https://github.com/sampletext32/ParkanPlayground.git synced 2025-05-19 11:51:17 +03:00
2025-04-16 20:54:08 +03:00

4.8 KiB

1# LEA instruction tests
2# Format: RawBytes;Instructions
3RawBytes;Instructions
4# LEA r32, m (opcode 8D) with basic addressing modes
5# SPECIAL CASE: When Mod=00 and R/M=101 (EBP), this doesn't actually refer to [EBP].
6# Instead, it's a special case that indicates a 32-bit displacement-only addressing mode.
7# Adding the correct test case:
8# LEA r32, m (opcode 8D) with displacement
9# LEA r32, m (opcode 8D) with negative displacement
10# LEA r32, m (opcode 8D) with SIB byte (no displacement)
11# SPECIAL CASE: The following encodings with EBP as base register have special rules.
12# When the SIB byte has Base=101 (EBP) and Mod=00, the base register is not used.
13# Instead, a 32-bit displacement follows the SIB byte (similar to the Mod=00, R/M=101 special case).
14# These instructions are commented out because they're invalid without the 32-bit displacement.
15# The correct encoding would include a 32-bit displacement after the SIB byte.
16# LEA r32, m (opcode 8D) with SIB byte and displacement
17# LEA r32, m (opcode 8D) with direct memory operand
18# LEA with different destination registers
19# SPECIAL CASE: The following encodings are invalid for LEA instructions.
20# When Mod=11 (bits 7-6 of the ModR/M byte), the R/M field specifies a register, not a memory location.
21# LEA requires a memory operand as its second operand
22# Valid LEA instructions with different destination registers (using Mod=00)
23# LEA with complex addressing modes