aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJohannes Stoelp <johannes.stoelp@gmail.com>2023-01-11 16:45:52 +0100
committerJohannes Stoelp <johannes.stoelp@gmail.com>2023-01-11 16:45:52 +0100
commit41f292a1e113f696af08f37d251e8ea36fa63280 (patch)
tree3aa5fc9a9eb5da4609dd8735a1e4d8b73a1be95b
parent1d958c27c35d917bf006a67c770502d35e990283 (diff)
downloadnotes-41f292a1e113f696af08f37d251e8ea36fa63280.tar.gz
notes-41f292a1e113f696af08f37d251e8ea36fa63280.zip
x86: add lea example
-rw-r--r--src/arch/x86_64.md6
1 files changed, 6 insertions, 0 deletions
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`.