1#include "pedigree/kernel/processor/state.h"
3processor_register_t Armv7InterruptState::getRegister(
size_t index)
const {
22 return index == 18 ? faultStatus : 0;
25void Armv7InterruptState::setRegister(
size_t index, uintptr_t value) {
28 }
else if (index == 13) {
30 }
else if (index == 14) {
32 }
else if (index == 15) {
34 }
else if (index == 16) {
36 }
else if (index == 17) {
38 }
else if (index == 18) {
43const char* Armv7InterruptState::getRegisterName(
size_t index)
const {
44 static const char*
const names[] = {
"r0",
"r1",
"r2",
"r3",
"r4",
"r5",
"r6",
45 "r7",
"r8",
"r9",
"r10",
"r11",
"r12",
"sp",
46 "lr",
"pc",
"cpsr",
"far",
"fsr"};
47 return index < 19 ? names[index] :
"?";
53 for (
size_t i = 0; i < 13; ++i) {
54 frame->r[i] = state.r[i];
59 frame->cpsr = userMode ? (0x10 | (state.cpsr & 0x20)) : 0x13;
60 frame->faultAddress = 0;
61 frame->faultStatus = 0;