1 #ifndef __MINI_ARM64_GSHAREDVT_H__
2 #define __MINI_ARM64_GSHAREDVT_H__
4 /* Argument marshallings for calls between gsharedvt and normal code */
6 GSHAREDVT_ARG_NONE = 0,
7 GSHAREDVT_ARG_BYVAL_TO_BYREF = 1,
8 GSHAREDVT_ARG_BYVAL_TO_BYREF_HFAR4 = 2,
9 GSHAREDVT_ARG_BYREF_TO_BYVAL = 3,
10 GSHAREDVT_ARG_BYREF_TO_BYVAL_HFAR4 = 4,
11 GSHAREDVT_ARG_BYREF_TO_BYREF = 5
12 } GSharedVtArgMarshal;
14 /* For arguments passed on the stack on ios */
16 GSHAREDVT_ARG_SIZE_NONE = 0,
17 GSHAREDVT_ARG_SIZE_I1 = 1,
18 GSHAREDVT_ARG_SIZE_U1 = 2,
19 GSHAREDVT_ARG_SIZE_I2 = 3,
20 GSHAREDVT_ARG_SIZE_U2 = 4,
21 GSHAREDVT_ARG_SIZE_I4 = 5,
22 GSHAREDVT_ARG_SIZE_U4 = 6,
25 /* Return value marshalling for calls between gsharedvt and normal code */
27 GSHAREDVT_RET_NONE = 0,
37 GSHAREDVT_RET_IREGS_1 = 10,
38 GSHAREDVT_RET_IREGS_2 = 11,
39 GSHAREDVT_RET_IREGS_3 = 12,
40 GSHAREDVT_RET_IREGS_4 = 13,
41 GSHAREDVT_RET_IREGS_5 = 14,
42 GSHAREDVT_RET_IREGS_6 = 15,
43 GSHAREDVT_RET_IREGS_7 = 16,
44 GSHAREDVT_RET_IREGS_8 = 17,
45 GSHAREDVT_RET_HFAR8_1 = 18,
46 GSHAREDVT_RET_HFAR8_2 = 19,
47 GSHAREDVT_RET_HFAR8_3 = 20,
48 GSHAREDVT_RET_HFAR8_4 = 21,
49 GSHAREDVT_RET_HFAR4_1 = 22,
50 GSHAREDVT_RET_HFAR4_2 = 23,
51 GSHAREDVT_RET_HFAR4_3 = 24,
52 GSHAREDVT_RET_HFAR4_4 = 25,
53 GSHAREDVT_RET_NUM = 26
54 } GSharedVtRetMarshal;
57 /* Method address to call */
59 /* The trampoline reads this, so keep the size explicit */
61 /* If ret_marshal != NONE, this is the reg of the vret arg, else -1 */
62 /* Equivalent of vret_arg_slot in x86 implementation. */
64 /* The stack slot where the return value will be stored */
66 int stack_usage, map_count;
67 /* If not -1, then make a virtual call using this vtable offset */
69 /* If 1, make an indirect call to the address in the rgctx reg */
71 /* Whenever this is a in or an out call */
73 /* Maps stack slots/registers in the caller to the stack slots/registers in the callee */
74 int map [MONO_ZERO_LEN_ARRAY];
77 /* Number of argument registers (r0..r8) */
78 #define NUM_GSHAREDVT_ARG_GREGS 9
79 #define NUM_GSHAREDVT_ARG_FREGS 8
82 mono_arm_start_gsharedvt_call (GSharedVtCallInfo *info, gpointer *caller, gpointer *callee, gpointer mrgctx_reg);
84 #endif /* __MINI_ARM64_GSHAREDVT_H__ */