20 #include "pedigree/kernel/processor/state.h" 21 #include "pedigree/kernel/Log.h" 22 #include "pedigree/kernel/processor/Processor.h" 24 const char *PPC32InterruptStateRegisterName[40] = {
25 "r0",
"r1",
"r2",
"r3",
"r4",
"r5",
"r6",
"r7",
"r8",
"r9",
26 "r10",
"r11",
"r12",
"r13",
"r14",
"r15",
"r16",
"r17",
"r18",
"r19",
27 "r20",
"r21",
"r22",
"r23",
"r24",
"r25",
"r26",
"r27",
"r28",
"r29",
28 "r30",
"r31",
"lr",
"ctr",
"cr",
"srr0",
"srr1",
"dsisr",
"dar",
"xer"};
31 : m_IntNumber(0), m_Xer(0), m_Ctr(0), m_Lr(0), m_Cr(0), m_Srr0(0),
32 m_Srr1(0), m_Dsisr(0), m_Dar(0), m_R0(0), m_R1(), m_R2(0), m_R3(0),
33 m_R4(0), m_R5(0), m_R6(0), m_R7(0), m_R8(0), m_R9(0), m_R10(0), m_R11(0),
34 m_R12(0), m_R13(0), m_R14(0), m_R15(0), m_R16(0), m_R17(0), m_R18(0),
35 m_R19(0), m_R20(0), m_R21(0), m_R22(0), m_R23(0), m_R24(0), m_R25(0),
36 m_R26(0), m_R27(0), m_R28(0), m_R29(0), m_R30(0), m_R31(0)
196 return PPC32InterruptStateRegisterName[index];
203 uintptr_t *pStack =
reinterpret_cast<uintptr_t *
>(state.getStackPointer());
205 uint32_t msr = MSR_IR | MSR_DR | MSR_EE | MSR_FP;
209 *--pStack = state.m_R31;
210 *--pStack = state.m_R30;
211 *--pStack = state.m_R29;
212 *--pStack = state.m_R28;
213 *--pStack = state.m_R27;
214 *--pStack = state.m_R26;
215 *--pStack = state.m_R25;
216 *--pStack = state.m_R24;
217 *--pStack = state.m_R23;
218 *--pStack = state.m_R22;
219 *--pStack = state.m_R21;
220 *--pStack = state.m_R20;
221 *--pStack = state.m_R19;
222 *--pStack = state.m_R18;
223 *--pStack = state.m_R17;
224 *--pStack = state.m_R16;
225 *--pStack = state.m_R15;
226 *--pStack = state.m_R14;
227 *--pStack = state.m_R13;
228 *--pStack = state.m_R12;
229 *--pStack = state.m_R11;
230 *--pStack = state.m_R10;
231 *--pStack = state.m_R9;
232 *--pStack = state.m_R8;
233 *--pStack = state.m_R7;
234 *--pStack = state.m_R6;
235 *--pStack = state.m_R5;
236 *--pStack = state.m_R4;
237 *--pStack = state.m_R3;
238 *--pStack = state.m_R2;
239 *--pStack = state.m_R1;
240 *--pStack = state.m_R0;
244 *--pStack = state.getInstructionPointer();
245 *--pStack = state.m_Cr;
246 *--pStack = state.m_Lr;
247 *--pStack = state.m_Ctr;
248 *--pStack = state.m_Xer;
const char * getRegisterName(size_t index) const
size_t getRegisterCount() const
processor_register_t getRegister(size_t index) const
PPC32InterruptState & operator=(const PPC32InterruptState &)
static PPC32InterruptState * construct(PPC32ProcessorState &state, bool userMode)