-
-static gboolean arch_handle_exception (MonoContext *ctx, gpointer obj, gboolean test_only);
-
-/*
-
-struct sigcontext {
- unsigned long trap_no;
- unsigned long error_code;
- unsigned long oldmask;
- unsigned long arm_r0;
- unsigned long arm_r1;
- unsigned long arm_r2;
- unsigned long arm_r3;
- unsigned long arm_r4;
- unsigned long arm_r5;
- unsigned long arm_r6;
- unsigned long arm_r7;
- unsigned long arm_r8;
- unsigned long arm_r9;
- unsigned long arm_r10;
- unsigned long arm_fp;
- unsigned long arm_ip;
- unsigned long arm_sp;
- unsigned long arm_lr;
- unsigned long arm_pc;
- unsigned long arm_cpsr;
- unsigned long fault_address;
-};
-
-gregs below is this struct
-struct user_regs {
- unsigned long int uregs[18];
-};
-
-the companion user_fpregs has just 8 double registers
-(it's valid for FPA mode, will need changes for VFP)
-
-typedef struct {
- gregset_t gregs;
- fpregset_t fpregs;
-} mcontext_t;
-
-typedef struct ucontext {
- unsigned long int uc_flags;
- struct ucontext *uc_link;
- __sigset_t uc_sigmask;
- stack_t uc_stack;
- mcontext_t uc_mcontext;
- long int uc_filler[5];
-} ucontext_t;
-
-*/
-
-/*
- * So, it turns out that the ucontext struct defined by libc is incorrect.
- * We define our own version here and use it instead.
- */
-
-typedef struct my_ucontext {
- unsigned long uc_flags;
- struct my_ucontext *uc_link;
- struct {
- void *p;
- int flags;
- size_t size;
- } sstack_data;
- struct sigcontext sig_ctx;
- /* some 2.6.x kernel has fp data here after a few other fields
- * we don't use them for now...
- */
-} my_ucontext;
-
-#define restore_regs_from_context(ctx_reg,ip_reg,tmp_reg) do { \
- int reg; \
- ARM_LDR_IMM (code, ip_reg, ctx_reg, G_STRUCT_OFFSET (MonoContext, eip)); \
- ARM_ADD_REG_IMM8 (code, tmp_reg, ctx_reg, G_STRUCT_OFFSET(MonoContext, regs)); \
- ARM_LDMIA (code, tmp_reg, MONO_ARM_REGSAVE_MASK); \
- } while (0)
-
-/* nothing to do */
-#define setup_context(ctx)