20 #include "pedigree/kernel/processor/state.h" 22 const char *X86InterruptStateRegisterName[11] = {
23 "eax",
"ebx",
"ecx",
"edx",
"edi",
"esi",
"ebp",
"esp",
"eip",
"eflags"};
55 return X86InterruptStateRegisterName[index];
62 uintptr_t *pStack =
reinterpret_cast<uintptr_t *
>(state.
getStackPointer());
66 *--pStack = (userMode) ? 0x23 : 0x10;
67 *--pStack = state.
esp;
70 *--pStack = (userMode) ? 0x1b : 0x08;
71 *--pStack = state.
eip;
74 *--pStack = state.
eax;
75 *--pStack = state.
ecx;
76 *--pStack = state.
edx;
77 *--pStack = state.
ebx;
79 *--pStack = state.
ebp;
80 *--pStack = state.
esi;
81 *--pStack = state.
edi;
82 *--pStack = (userMode) ? 0x23 : 0x10;
processor_register_t getRegister(size_t index) const
size_t getRegisterCount() const
static X86InterruptState * construct(class X86ProcessorState &state, bool userMode)
uintptr_t getStackPointer() const
const char * getRegisterName(size_t index) const
uintptr_t getStackPointer() const