0
mirror of https://github.com/sampletext32/ParkanPlayground.git synced 2025-05-19 03:41:18 +03:00

5.0 KiB

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