#include <mach/kern_return.h>
#include <mach/thread_status.h>
#include <kern/thread.h>
-#include <kern/kalloc.h>
#include <arm/vmparam.h>
#include <arm/cpu_data_internal.h>
ts32->sp = (uint32_t)get_saved_state_sp(saved_state);
ts32->pc = (uint32_t)get_saved_state_pc(saved_state);
ts32->cpsr = get_saved_state_cpsr(saved_state);
- for (i = 0; i < 13; i++)
+ for (i = 0; i < 13; i++) {
ts32->r[i] = (uint32_t)get_saved_state_reg(saved_state, i);
+ }
}
/*
set_saved_state_cpsr(saved_state, (ts32->cpsr & ~PSR64_MODE_MASK) | PSR64_MODE_RW_32);
#elif defined(__arm__)
set_saved_state_cpsr(saved_state, (ts32->cpsr & ~PSR_USER_MASK) | (ts32->cpsr & PSR_USER_MASK));
-#else
+#else
#error Unknown architecture.
#endif
- for (i = 0; i < 13; i++)
+ for (i = 0; i < 13; i++) {
set_saved_state_reg(saved_state, i, ts32->r[i]);
+ }
}
-
-