diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2021-03-16 12:34:18 +0200 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2021-03-16 12:34:18 +0200 |
commit | d39920b62e3e0371c5698aae2c316671130b0956 (patch) | |
tree | 7b561a5f53d1d4373fbe30c72d5ef3b9888a5d4a /src/cpu | |
parent | Map .text and .rodata as read-only (diff) | |
download | kernel.cpp-d39920b62e3e0371c5698aae2c316671130b0956.tar.xz |
Switch lto to full
Diffstat (limited to 'src/cpu')
-rw-r--r-- | src/cpu/registers.h | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/cpu/registers.h b/src/cpu/registers.h index edb6b7b..d2f2e74 100644 --- a/src/cpu/registers.h +++ b/src/cpu/registers.h @@ -5,13 +5,22 @@ namespace x86 { struct cpu_state { - /* pusha */ - uint32_t edi, esi; // destination index, source index - uint32_t ebp, esp; // base pointer, stack pointer - uint32_t ebx, edx, ecx, eax; // general registers + /* registers stored by pusha */ + // indexes and pointers + uint32_t edi; // destination index: string, memory copying and setting, far pointer addressing with ES + uint32_t esi; // source index: string and memory copying + uint32_t ebp; // stack base pointer + const uint32_t esp; // stack pointer; this register is not used by popa - uint32_t irq; - uint32_t error; + // general registers + uint32_t ebx; // base register: base pointer for memory access + uint32_t edx; // data register: I/O ports, arithmetic + uint32_t ecx; // counter register: loop counter, for shifts + uint32_t eax; // accumulator register: I/O ports, arithmetic + + /* pushed by interrupt handler macros */ + uint32_t irq; // interrupt number + uint32_t error; // error code /* stack frame, pushed by cpu */ uint32_t eip; |