blob: edb6b7b49885d608732b0f0a9f8ffa72e4d6ba64 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#pragma once
#include <types.h>
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
uint32_t irq;
uint32_t error;
/* stack frame, pushed by cpu */
uint32_t eip;
uint32_t cs;
uint32_t eflags;
uint32_t __esp;
uint32_t ss;
} __attribute__((packed));
} // namespace x86
typedef x86::cpu_state cpu_state_t;
|