From 41f292a1e113f696af08f37d251e8ea36fa63280 Mon Sep 17 00:00:00 2001 From: Johannes Stoelp Date: Wed, 11 Jan 2023 16:45:52 +0100 Subject: x86: add lea example --- src/arch/x86_64.md | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/arch/x86_64.md') diff --git a/src/arch/x86_64.md b/src/arch/x86_64.md index ede26c7..c61b328 100644 --- a/src/arch/x86_64.md +++ b/src/arch/x86_64.md @@ -90,6 +90,12 @@ lea rax, [rip+.my_str] // load addr of .my_str into rax .asciz "Foo" ``` +Load effective address: +```x86asm +mov rax, 2 +lea r11, [rax + 3] // r11 <- 5 +``` + ## String instructions The operand size of a string instruction is defined by the instruction suffix `b | w | d | q`. -- cgit v1.2.3