#define EMIT_COND_BRANCH(ins,cond) \
{ \
-if (ins->flags & MONO_INST_BRLABEL) { \
- if (ins->inst_i0->inst_c0) { \
- int displace; \
- displace = ((cfg->native_code + ins->inst_i0->inst_c0) - code) / 2; \
- if (s390_is_imm16(displace)) { \
- s390_brc (code, cond, displace); \
- } else { \
- s390_jcl (code, cond, displace); \
- } \
- } else { \
- mono_add_patch_info (cfg, code - cfg->native_code, \
- MONO_PATCH_INFO_LABEL, ins->inst_i0); \
- s390_jcl (code, cond, 0); \
- } \
-} else { \
- if (ins->inst_true_bb->native_offset) { \
- int displace; \
- displace = ((cfg->native_code + \
- ins->inst_true_bb->native_offset) - code) / 2; \
- if (s390_is_imm16(displace)) { \
- s390_brc (code, cond, displace); \
- } else { \
- s390_jcl (code, cond, displace); \
- } \
- } else { \
- mono_add_patch_info (cfg, code - cfg->native_code, \
- MONO_PATCH_INFO_BB, ins->inst_true_bb); \
- s390_jcl (code, cond, 0); \
- } \
-} \
+if (ins->inst_true_bb->native_offset) { \
+ int displace; \
+ displace = ((cfg->native_code + \
+ ins->inst_true_bb->native_offset) - code) / 2; \
+ if (s390_is_imm16(displace)) { \
+ s390_brc (code, cond, displace); \
+ } else { \
+ s390_jcl (code, cond, displace); \
+ } \
+} else { \
+ mono_add_patch_info (cfg, code - cfg->native_code, \
+ MONO_PATCH_INFO_BB, ins->inst_true_bb); \
+ s390_jcl (code, cond, 0); \
+} \
}
#define EMIT_UNCOND_BRANCH(ins) \
{ \
-if (ins->flags & MONO_INST_BRLABEL) { \
- if (ins->inst_i0->inst_c0) { \
- int displace; \
- displace = ((cfg->native_code + ins->inst_i0->inst_c0) - code) / 2; \
- if (s390_is_imm16(displace)) { \
- s390_brc (code, S390_CC_UN, displace); \
- } else { \
- s390_jcl (code, S390_CC_UN, displace); \
- } \
- } else { \
- mono_add_patch_info (cfg, code - cfg->native_code, \
- MONO_PATCH_INFO_LABEL, ins->inst_i0); \
- s390_jcl (code, S390_CC_UN, 0); \
- } \
-} else { \
- if (ins->inst_target_bb->native_offset) { \
- int displace; \
- displace = ((cfg->native_code + \
- ins->inst_target_bb->native_offset) - code) / 2; \
- if (s390_is_imm16(displace)) { \
- s390_brc (code, S390_CC_UN, displace); \
- } else { \
- s390_jcl (code, S390_CC_UN, displace); \
- } \
- } else { \
- mono_add_patch_info (cfg, code - cfg->native_code, \
- MONO_PATCH_INFO_BB, ins->inst_target_bb); \
- s390_jcl (code, S390_CC_UN, 0); \
- } \
-} \
+if (ins->inst_target_bb->native_offset) { \
+ int displace; \
+ displace = ((cfg->native_code + \
+ ins->inst_target_bb->native_offset) - code) / 2; \
+ if (s390_is_imm16(displace)) { \
+ s390_brc (code, S390_CC_UN, displace); \
+ } else { \
+ s390_jcl (code, S390_CC_UN, displace); \
+ } \
+} else { \
+ mono_add_patch_info (cfg, code - cfg->native_code, \
+ MONO_PATCH_INFO_BB, ins->inst_target_bb); \
+ s390_jcl (code, S390_CC_UN, 0); \
+} \
}
#define EMIT_COND_SYSTEM_EXCEPTION(cond,exc_name) \
static guchar * emit_float_to_int (MonoCompile *, guchar *, int, int, int, gboolean);
gpointer mono_arch_get_lmf_addr (void);
static guint8 * emit_load_volatile_registers(guint8 *, MonoCompile *);
-static void emit_sig_cookie (MonoCompile *, MonoCallInst *, CallInfo *, int);
+static void emit_sig_cookie (MonoCompile *, MonoCallInst *, CallInfo *);
/*========================= End of Prototypes ======================*/
MonoMarshalType *info;
if (type->data.klass->enumtype) {
- simpleType = type->data.klass->enum_basetype->type;
+ simpleType = mono_class_enum_basetype (type->data.klass)->type;
printf("{VALUETYPE} - ");
goto enum_parmtype;
}
case MONO_TYPE_VALUETYPE: {
MonoMarshalType *info;
if (type->data.klass->enumtype) {
- type = type->data.klass->enum_basetype;
+ type = mono_class_enum_basetype (type->data.klass);
goto handle_enum;
} else {
guint8 *p = va_arg (ap, gpointer);
return FALSE;
case MONO_TYPE_VALUETYPE:
if (t->data.klass->enumtype)
- return is_regsize_var (t->data.klass->enum_basetype);
+ return is_regsize_var (mono_class_enum_basetype (t->data.klass));
return FALSE;
}
return FALSE;
sz->code_size += 4;
break;
case MONO_TYPE_GENERICINST:
- if (!mono_type_generic_inst_is_valuetype (sig->ret)) {
+ if (!mono_type_generic_inst_is_valuetype (ret_type)) {
cinfo->ret.reg = s390_r2;
sz->code_size += 4;
break;
case MONO_TYPE_VALUETYPE: {
MonoClass *klass = mono_class_from_mono_type (sig->ret);
if (klass->enumtype) {
- simpletype = klass->enum_basetype->type;
+ simpletype = mono_class_enum_basetype (klass)->type;
goto enum_retvalue;
}
if (sig->pinvoke)
nParm++;
break;
case MONO_TYPE_GENERICINST:
- if (!mono_type_generic_inst_is_valuetype (sig->params [i])) {
+ if (!mono_type_generic_inst_is_valuetype (ptype)) {
cinfo->args[nParm].size = sizeof(gpointer);
add_general (&gr, sz, cinfo->args+nParm, TRUE);
nParm++;
/*------------------------------------------------------------------*/
void*
-mono_arch_instrument_epilog (MonoCompile *cfg, void *func, void *p, gboolean enable_arguments)
+mono_arch_instrument_epilog_full (MonoCompile *cfg, void *func, void *p, gboolean enable_arguments, gboolean preserve_argument_registers)
{
guchar *code = p;
int save_mode = SAVE_NONE,
break;
case MONO_TYPE_VALUETYPE:
if (mono_method_signature (method)->ret->data.klass->enumtype) {
- rtype = mono_method_signature (method)->ret->data.klass->enum_basetype->type;
+ rtype = mono_class_enum_basetype (mono_method_signature (method)->ret->data.klass)->type;
goto handle_enum;
}
save_mode = SAVE_STRUCT;
/*------------------------------------------------------------------*/
/* */
-/* Name - mono_arch_emit_inst_for_method */
+/* Name - mono_arch_emit_inst_for_method */
/* */
/*------------------------------------------------------------------*/
/*========================= End of Function ========================*/
+/*------------------------------------------------------------------*/
+/* */
+/* Name - mono_arch_decompose_opts */
+/* */
+/*------------------------------------------------------------------*/
+
void
mono_arch_decompose_opts (MonoCompile *cfg, MonoInst *ins)
{
/*------------------------------------------------------------------*/
/* */
-/* Name - mono_arch_decompose_long_opts */
+/* Name - mono_arch_decompose_long_opts */
/* */
/*------------------------------------------------------------------*/
/*========================= End of Function ========================*/
-/*------------------------------------------------------------------*/
-/* */
-/* Name - mono_arch_get_thread_intrinsic */
-/* */
-/* Function - */
-/* */
-/* Returns - */
-/* */
-/*------------------------------------------------------------------*/
-
-MonoInst *
-mono_arch_get_thread_intrinsic (MonoCompile* cfg)
-{
- MonoInst *ins;
-
- if (thread_tls_offset == -1)
- return NULL;
-
- MONO_INST_NEW (cfg, ins, OP_TLS_GET);
- ins->inst_offset = thread_tls_offset;
- return (ins);
-}
-
-/*========================= End of Function ========================*/
-
/*------------------------------------------------------------------*/
/* */
/* Name - mono_arch_flush_register_windows */
/*========================= End of Function ========================*/
+/*------------------------------------------------------------------*/
+/* */
+/* Name - mono_arch_context_get_int_reg. */
+/* */
+/* Function - Dummy entry point until s390x supports aot. */
+/* */
+/* Returns - Pointer to intreg. */
+/* */
+/*------------------------------------------------------------------*/
+
gpointer
mono_arch_context_get_int_reg (MonoContext *ctx, int reg)
{
g_assert_not_reached ();
return NULL;
}
+
+/*========================= End of Function ========================*/