1
0
mirror of https://github.com/0xAX/linux-insides.git synced 2025-01-02 20:00:56 +00:00

Merge pull request #856 from vctorized/master

Update linux-theory-3.md
This commit is contained in:
Alex Kuleshov 2024-11-23 23:42:33 +05:00 committed by GitHub
commit 5bf7e3dfb2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -190,7 +190,7 @@ If we look at the assembly output:
400525: 48 01 d0 add %rdx,%rax
```
we will see that the `%rdx` register is overwritten with `0x64` or `100` and the result will be `110` instead of `10`. Now if we add the `%rdx` register to the list of `clobbered` registers:
we will see that the `%rdx` register is overwritten with `0x64` or `100` and the result will be `110` instead of `15`. Now if we add the `%rdx` register to the list of `clobbered` registers:
```C
__asm__("movq $100, %%rdx\t\n"