The Pedigree Project  0.1
Public Member Functions | Public Attributes | List of all members
MIPS32InterruptState Class Reference

#include <state.h>

+ Collaboration diagram for MIPS32InterruptState:

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 &)
 
MIPS32InterruptStateoperator= (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
 

Detailed Description

MIPS32 Interrupt State

Definition at line 30 of file mips32/state.h.

Constructor & Destructor Documentation

MIPS32InterruptState::MIPS32InterruptState ( )

The default constructor

Note
NOT implemented

Definition at line 28 of file mips32/state.cc.

MIPS32InterruptState::MIPS32InterruptState ( const MIPS32InterruptState is)

The copy-constructor

Note
NOT implemented

Definition at line 36 of file mips32/state.cc.

References operator=().

MIPS32InterruptState::~MIPS32InterruptState ( )
inline

The destructor

Note
NOT implemented

Definition at line 112 of file mips32/state.h.

Member Function Documentation

bool MIPS32InterruptState::branchDelay ( ) const
inline

Was the exception in a branch delay slot?

Returns
True if the exception occurred in a branch delay slot.

Definition at line 240 of file mips32/state.h.

References m_Cause.

uintptr_t MIPS32InterruptState::getBasePointer ( ) const
inline

Get the base-pointer

Returns
the base-pointer

Definition at line 209 of file mips32/state.h.

uintptr_t MIPS32InterruptState::getInstructionPointer ( ) const
inline

Get the instruction-pointer of the next instruction that is executed after the interrupt is processed

Returns
the instruction-pointer

Definition at line 202 of file mips32/state.h.

References m_Epc.

size_t MIPS32InterruptState::getInterruptNumber ( ) const
inline

Get the interrupt number

Returns
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

Parameters
[in]indexthe index of the register (from 0 to getRegisterCount() - 1)
Returns
the value of the register

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

Returns
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

Parameters
[in]indexthe index of the register (from 0 to getRegisterCount() - 1)
Returns
the name of the register

Definition at line 166 of file mips32/state.cc.

size_t MIPS32InterruptState::getRegisterSize ( size_t  index) const
inline

Get the register's size in bytes

Parameters
[in]indexthe index of the register (from 0 to getRegisterCount() - 1)
Returns
the register size in bytes

Definition at line 216 of file mips32/state.h.

uintptr_t MIPS32InterruptState::getStackPointer ( ) const
inline

Get the stack-pointer before the interrupt occured

Returns
the stack-pointer before the interrupt

Definition at line 195 of file mips32/state.h.

References m_Sp.

size_t MIPS32InterruptState::getSyscallNumber ( ) const
inline

Get the syscall function number

Returns
the syscall function number

Definition at line 235 of file mips32/state.h.

size_t MIPS32InterruptState::getSyscallService ( ) const
inline

Get the syscall service number

Returns
the syscall service number

Definition at line 231 of file mips32/state.h.

bool MIPS32InterruptState::kernelMode ( ) const
inline

Did the interrupt happen in kernel-mode?

Returns
true, if the interrupt happened in kernel-mode, false otherwise

Definition at line 221 of file mips32/state.h.

MIPS32InterruptState & MIPS32InterruptState::operator= ( const MIPS32InterruptState is)

The assignement operator

Note
NOT implemented

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().

+ Here is the caller graph for this function:

void MIPS32InterruptState::setBasePointer ( uintptr_t  basePointer)
inline

Set the base-pointer

Parameters
[in]basePointerthe new base-pointer

Definition at line 213 of file mips32/state.h.

void MIPS32InterruptState::setInstructionPointer ( uintptr_t  instructionPointer)
inline

Set the instruction-pointer

Parameters
[in]instructionPointerthe new instruction-pointer

Definition at line 206 of file mips32/state.h.

void MIPS32InterruptState::setStackPointer ( uintptr_t  stackPointer)
inline

Set the userspace stack-pointer

Parameters
[in]stackPointerthe new stack-pointer

Definition at line 199 of file mips32/state.h.

Member Data Documentation

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=().


The documentation for this class was generated from the following files: