The Pedigree Project
0.1
|
#include <state.h>
Public Member Functions | |
uintptr_t | getStackPointer () const |
void | setStackPointer (uintptr_t stackPointer) |
uintptr_t | getInstructionPointer () const |
void | setInstructionPointer (uintptr_t instructionPointer) |
uintptr_t | getBasePointer () const |
void | setBasePointer (uintptr_t basePointer) |
size_t | getRegisterCount () const |
processor_register_t | getRegister (size_t index) const |
const char * | getRegisterName (size_t index) const |
size_t | getRegisterSize (size_t index) const |
bool | kernelMode () const |
size_t | getInterruptNumber () const |
size_t | getSyscallService () const |
size_t | getSyscallNumber () const |
bool | branchDelay () const |
MIPS32InterruptState () | |
MIPS32InterruptState (const MIPS32InterruptState &) | |
MIPS32InterruptState & | operator= (const MIPS32InterruptState &) |
~MIPS32InterruptState () | |
Public Attributes | |
uint32_t | m_At |
uint32_t | m_V0 |
uint32_t | m_V1 |
uint32_t | m_A0 |
uint32_t | m_A1 |
uint32_t | m_A2 |
uint32_t | m_A3 |
uint32_t | m_T0 |
uint32_t | m_T1 |
uint32_t | m_T2 |
uint32_t | m_T3 |
uint32_t | m_T4 |
uint32_t | m_T5 |
uint32_t | m_T6 |
uint32_t | m_T7 |
uint32_t | m_S0 |
uint32_t | m_S1 |
uint32_t | m_S2 |
uint32_t | m_S3 |
uint32_t | m_S4 |
uint32_t | m_S5 |
uint32_t | m_S6 |
uint32_t | m_S7 |
uint32_t | m_T8 |
uint32_t | m_T9 |
uint32_t | m_Gp |
uint32_t | m_Sp |
uint32_t | m_Fp |
uint32_t | m_Ra |
uint32_t | m_Sr |
uint32_t | m_Cause |
uint32_t | m_Epc |
uint32_t | m_BadVAddr |
uint32_t | m_Context |
MIPS32 Interrupt State
Definition at line 30 of file mips32/state.h.
MIPS32InterruptState::MIPS32InterruptState | ( | ) |
MIPS32InterruptState::MIPS32InterruptState | ( | const MIPS32InterruptState & | is | ) |
The copy-constructor
Definition at line 36 of file mips32/state.cc.
References operator=().
|
inline |
|
inline |
Was the exception in a branch delay slot?
Definition at line 240 of file mips32/state.h.
References m_Cause.
|
inline |
|
inline |
Get the instruction-pointer of the next instruction that is executed after the interrupt is processed
Definition at line 202 of file mips32/state.h.
References m_Epc.
|
inline |
Get the interrupt number
Definition at line 225 of file mips32/state.h.
References m_Cause.
processor_register_t MIPS32InterruptState::getRegister | ( | size_t | index | ) | const |
Get a specific register
[in] | index | the index of the register (from 0 to getRegisterCount() - 1) |
Definition at line 90 of file mips32/state.cc.
References m_A0, m_A1, m_A2, m_A3, m_At, m_BadVAddr, m_Cause, m_Context, m_Epc, m_Fp, m_Gp, m_Ra, m_S0, m_S1, m_S2, m_S3, m_S4, m_S5, m_S6, m_S7, m_Sp, m_Sr, m_T0, m_T1, m_T2, m_T3, m_T4, m_T5, m_T6, m_T7, m_T8, m_T9, m_V0, and m_V1.
size_t MIPS32InterruptState::getRegisterCount | ( | ) | const |
Get the number of registers
Definition at line 86 of file mips32/state.cc.
const char * MIPS32InterruptState::getRegisterName | ( | size_t | index | ) | const |
Get the name of a specific register
[in] | index | the index of the register (from 0 to getRegisterCount() - 1) |
Definition at line 166 of file mips32/state.cc.
|
inline |
Get the register's size in bytes
[in] | index | the index of the register (from 0 to getRegisterCount() - 1) |
Definition at line 216 of file mips32/state.h.
|
inline |
Get the stack-pointer before the interrupt occured
Definition at line 195 of file mips32/state.h.
References m_Sp.
|
inline |
Get the syscall function number
Definition at line 235 of file mips32/state.h.
|
inline |
Get the syscall service number
Definition at line 231 of file mips32/state.h.
|
inline |
Did the interrupt happen in kernel-mode?
Definition at line 221 of file mips32/state.h.
MIPS32InterruptState & MIPS32InterruptState::operator= | ( | const MIPS32InterruptState & | is | ) |
The assignement operator
Definition at line 48 of file mips32/state.cc.
References m_A0, m_A1, m_A2, m_A3, m_At, m_BadVAddr, m_Context, m_Epc, m_Fp, m_Gp, m_Ra, m_S0, m_S1, m_S2, m_S3, m_S4, m_S5, m_S6, m_S7, m_Sp, m_Sr, m_T0, m_T1, m_T2, m_T3, m_T4, m_T5, m_T6, m_T7, m_T8, m_T9, m_V0, and m_V1.
Referenced by MIPS32InterruptState().
|
inline |
Set the base-pointer
[in] | basePointer | the new base-pointer |
Definition at line 213 of file mips32/state.h.
|
inline |
Set the instruction-pointer
[in] | instructionPointer | the new instruction-pointer |
Definition at line 206 of file mips32/state.h.
|
inline |
Set the userspace stack-pointer
[in] | stackPointer | the new stack-pointer |
Definition at line 199 of file mips32/state.h.
uint32_t MIPS32InterruptState::m_A0 |
Function argument 0
Definition at line 123 of file mips32/state.h.
Referenced by getRegister(), and operator=().
uint32_t MIPS32InterruptState::m_A1 |
Function argument 1
Definition at line 125 of file mips32/state.h.
Referenced by getRegister(), and operator=().
uint32_t MIPS32InterruptState::m_A2 |
Function argument 2
Definition at line 127 of file mips32/state.h.
Referenced by getRegister(), and operator=().
uint32_t MIPS32InterruptState::m_A3 |
Function argument 3
Definition at line 129 of file mips32/state.h.
Referenced by getRegister(), and operator=().
uint32_t MIPS32InterruptState::m_At |
Assembler temporary register
Definition at line 117 of file mips32/state.h.
Referenced by getRegister(), and operator=().
uint32_t MIPS32InterruptState::m_BadVAddr |
Bad virtual address
Definition at line 181 of file mips32/state.h.
Referenced by getRegister(), and operator=().
uint32_t MIPS32InterruptState::m_Cause |
Exception cause
Definition at line 177 of file mips32/state.h.
Referenced by branchDelay(), getInterruptNumber(), and getRegister().
uint32_t MIPS32InterruptState::m_Context |
TLB miss context
Definition at line 183 of file mips32/state.h.
Referenced by getRegister(), and operator=().
uint32_t MIPS32InterruptState::m_Epc |
Exception restart address
Definition at line 179 of file mips32/state.h.
Referenced by getInstructionPointer(), getRegister(), and operator=().
uint32_t MIPS32InterruptState::m_Fp |
Frame pointer
Definition at line 171 of file mips32/state.h.
Referenced by getRegister(), and operator=().
uint32_t MIPS32InterruptState::m_Gp |
Global pointer
Definition at line 167 of file mips32/state.h.
Referenced by getRegister(), and operator=().
uint32_t MIPS32InterruptState::m_Ra |
Subroutine return address
Definition at line 173 of file mips32/state.h.
Referenced by getRegister(), and operator=().
uint32_t MIPS32InterruptState::m_S0 |
Subroutine local 0
Definition at line 147 of file mips32/state.h.
Referenced by getRegister(), and operator=().
uint32_t MIPS32InterruptState::m_S1 |
Subroutine local 1
Definition at line 149 of file mips32/state.h.
Referenced by getRegister(), and operator=().
uint32_t MIPS32InterruptState::m_S2 |
Subroutine local 2
Definition at line 151 of file mips32/state.h.
Referenced by getRegister(), and operator=().
uint32_t MIPS32InterruptState::m_S3 |
Subroutine local 3
Definition at line 153 of file mips32/state.h.
Referenced by getRegister(), and operator=().
uint32_t MIPS32InterruptState::m_S4 |
Subroutine local 4
Definition at line 155 of file mips32/state.h.
Referenced by getRegister(), and operator=().
uint32_t MIPS32InterruptState::m_S5 |
Subroutine local 5
Definition at line 157 of file mips32/state.h.
Referenced by getRegister(), and operator=().
uint32_t MIPS32InterruptState::m_S6 |
Subroutine local 6
Definition at line 159 of file mips32/state.h.
Referenced by getRegister(), and operator=().
uint32_t MIPS32InterruptState::m_S7 |
Subroutine local 7
Definition at line 161 of file mips32/state.h.
Referenced by getRegister(), and operator=().
uint32_t MIPS32InterruptState::m_Sp |
Stack pointer
Definition at line 169 of file mips32/state.h.
Referenced by getRegister(), getStackPointer(), and operator=().
uint32_t MIPS32InterruptState::m_Sr |
Status register
Definition at line 175 of file mips32/state.h.
Referenced by getRegister(), and operator=().
uint32_t MIPS32InterruptState::m_T0 |
Subroutine temporary 0
Definition at line 131 of file mips32/state.h.
Referenced by getRegister(), and operator=().
uint32_t MIPS32InterruptState::m_T1 |
Subroutine temporary 1
Definition at line 133 of file mips32/state.h.
Referenced by getRegister(), and operator=().
uint32_t MIPS32InterruptState::m_T2 |
Subroutine temporary 2
Definition at line 135 of file mips32/state.h.
Referenced by getRegister(), and operator=().
uint32_t MIPS32InterruptState::m_T3 |
Subroutine temporary 3
Definition at line 137 of file mips32/state.h.
Referenced by getRegister(), and operator=().
uint32_t MIPS32InterruptState::m_T4 |
Subroutine temporary 4
Definition at line 139 of file mips32/state.h.
Referenced by getRegister(), and operator=().
uint32_t MIPS32InterruptState::m_T5 |
Subroutine temporary 5
Definition at line 141 of file mips32/state.h.
Referenced by getRegister(), and operator=().
uint32_t MIPS32InterruptState::m_T6 |
Subroutine temporary 6
Definition at line 143 of file mips32/state.h.
Referenced by getRegister(), and operator=().
uint32_t MIPS32InterruptState::m_T7 |
Subroutine temporary 7
Definition at line 145 of file mips32/state.h.
Referenced by getRegister(), and operator=().
uint32_t MIPS32InterruptState::m_T8 |
Subroutine temporary 8
Definition at line 163 of file mips32/state.h.
Referenced by getRegister(), and operator=().
uint32_t MIPS32InterruptState::m_T9 |
Subroutine temporary 9
Definition at line 165 of file mips32/state.h.
Referenced by getRegister(), and operator=().
uint32_t MIPS32InterruptState::m_V0 |
Value returned by subroutine 0
Definition at line 119 of file mips32/state.h.
Referenced by getRegister(), and operator=().
uint32_t MIPS32InterruptState::m_V1 |
Value returned by subroutine 1
Definition at line 121 of file mips32/state.h.
Referenced by getRegister(), and operator=().