1#include "pedigree/kernel/processor/state.h"
3processor_register_t Arm64InterruptState::getRegister(
size_t index)
const {
13 return index == 33 ? pstate : 0;
16void Arm64InterruptState::setRegister(
size_t index, uintptr_t value) {
19 }
else if (index == 31) {
21 }
else if (index == 32) {
23 }
else if (index == 33) {
28const char* Arm64InterruptState::getRegisterName(
size_t index)
const {
29 static const char*
const names[] = {
30 "x0",
"x1",
"x2",
"x3",
"x4",
"x5",
"x6",
"x7",
"x8",
"x9",
"x10",
"x11",
31 "x12",
"x13",
"x14",
"x15",
"x16",
"x17",
"x18",
"x19",
"x20",
"x21",
"x22",
"x23",
32 "x24",
"x25",
"x26",
"x27",
"x28",
"x29",
"x30",
"sp",
"pc",
"pstate"};
33 return index < 34 ? names[index] :
"?";
39 for (
size_t i = 0; i < 31; ++i) {
40 frame->x[i] = state.x[i];
44 frame->pstate = userMode ? 0 : 5;