#define __MONO_MINI_ARM_H__
#include <mono/arch/arm/arm-codegen.h>
+#include <mono/utils/mono-context.h>
#include <glib.h>
#if defined(ARM_FPU_NONE) || (defined(__ARM_EABI__) && !defined(ARM_FPU_VFP))
#define MONO_MAX_IREGS 16
#define MONO_MAX_FREGS 16
-#define MONO_SAVED_GREGS 10 /* r4-411, ip, lr */
+#define MONO_SAVED_GREGS 10 /* r4-r11, ip, lr */
#define MONO_SAVED_FREGS 8
/* r4-r11, ip, lr: registers saved in the LMF */
#define MONO_ARM_REGSAVE_MASK 0x5ff0
+#define MONO_ARM_FIRST_SAVED_REG ARMREG_R4
+#define MONO_ARM_NUM_SAVED_REGS 10
/* Parameters used by the register allocator */
gulong iregs [14];
};
-/* we define our own structure and we'll copy the data
- * from sigcontext/ucontext/mach when we need it.
- * This also makes us save stack space and time when copying
- * We might also want to add an additional field to propagate
- * the original context from the signal handler.
- */
-typedef struct {
- gulong eip; // pc
- gulong esp; // sp
- gulong regs [16];
- double fregs [MONO_SAVED_FREGS];
-} MonoContext;
-
typedef struct MonoCompileArch {
gpointer seq_point_info_var, ss_trigger_page_var;
gboolean omit_fp, omit_fp_computed;
/* First argument reg */
#define MONO_ARCH_VTABLE_REG ARMREG_R0
-/* we have the stack pointer, not the base pointer in sigcontext */
-#define MONO_CONTEXT_SET_IP(ctx,ip) do { (ctx)->eip = (int)ip; } while (0);
-#define MONO_CONTEXT_SET_BP(ctx,bp) do { (ctx)->regs [ARMREG_FP] = (int)bp; } while (0);
-#define MONO_CONTEXT_SET_SP(ctx,bp) do { (ctx)->esp = (int)bp; } while (0);
-
-#define MONO_CONTEXT_GET_IP(ctx) ((gpointer)((ctx)->eip))
-#define MONO_CONTEXT_GET_BP(ctx) ((gpointer)((ctx)->regs [ARMREG_FP]))
-#define MONO_CONTEXT_GET_SP(ctx) ((gpointer)((ctx)->esp))
-
#define MONO_CONTEXT_SET_LLVM_EXC_REG(ctx, exc) do { (ctx)->regs [0] = (gsize)exc; } while (0)
#define MONO_INIT_CONTEXT_FROM_FUNC(ctx,func) do { \
GSList*
mono_arm_get_exception_trampolines (gboolean aot) MONO_INTERNAL;
+guint8*
+mono_arm_get_thumb_plt_entry (guint8 *code) MONO_INTERNAL;
+
#endif /* __MONO_MINI_ARM_H__ */