Add full list of registers

This commit is contained in:
Jean-Claude 2023-10-29 19:47:13 +01:00
parent b8d5b4049c
commit f57b7c8153
Signed by: jeanclaude
GPG Key ID: 8A300F57CBB9F63E
1 changed files with 31 additions and 5 deletions

View File

@ -9,11 +9,6 @@
- `FB`: function begin
- `FE`: function end
## Calling Conversions
- Args: `RDI, RSI, RDX, RCX, R8, R9`
- System Calls: `R10` (instead of `RCX`)
- Return: `RAX`
## AT&T
- source comes before destination
- mnemonic suffixes indicate the size of the operands (q for quad, etc.)
@ -25,3 +20,34 @@
- Opcodes: <https://www.felixcloutier.com/x86/index.html>
- General Intel instructions: <https://www.intel.com/content/www/us/en/architecture-and-technology/64-ia-32-architectures-software-developer-instruction-set-reference-manual-325383.html>
- More performance oriented: <https://www.agner.org/optimize/>
## Registers
### Overview
| --- | --- | --- | --- |
| 64-bit register | Lower 32 bits | Lower 16 bits | Lower 8 bits |
| --- | --- | --- | --- |
| rax | eax | ax | al |
| rbx | ebx | bx | bl |
| rcx | ecx | cx | cl |
| rdx | edx | dx | dl |
| rsi | esi | si | sil |
| rdi | edi | di | dil |
| rbp | ebp | bp | bpl |
| rsp | esp | sp | spl |
| r8 | r8d | r8w | r8b |
| r9 | r9d | r9w | r9b |
| r10 | r10d | r10w | r10b |
| r11 | r11d | r11w | r11b |
| r12 | r12d | r12w | r12b |
| r13 | r13d | r13w | r13b |
| r14 | r14d | r14w | r14b |
| r15 | r15d | r15w | r15b |
### Calling Conversions
- Args: `RDI, RSI, RDX, RCX, R8, R9`
- System Calls: `R10` (instead of `RCX`)
- Return: `RAX`
- Callee-Saved: `RBX, RBP, R12, R13, R14, R15`
- Caller-Saved: `RAX, RCX, RDX, RDI, RSI, R8, R9`