s390_lgr (code, s390_r14, STK_BASE);
s390_sgr (code, s390_r14, s390_r1);
s390_stg (code, s390_r14, 0, s390_r13,
- G_STRUCT_OFFSET(MonoLMF, ebp));
+ MONO_STRUCT_OFFSET(MonoLMF, ebp));
}
s390_lg (code, s390_r13, 0, STK_BASE, 0);
s390_sgr (code, STK_BASE, s390_r1);
/* Preserve the parameter registers while we fix up the lmf */
/*---------------------------------------------------------------*/
s390_stmg (code, s390_r2, s390_r6, s390_r13,
- G_STRUCT_OFFSET(MonoLMF, pregs[0]));
+ MONO_STRUCT_OFFSET(MonoLMF, pregs));
- mini_gc_set_slot_type_from_fp (cfg, lmfOffset + MONO_STRUCT_OFFSET (MonoLMF, pregs[0]), SLOT_NOREF);
- mini_gc_set_slot_type_from_fp (cfg, lmfOffset + MONO_STRUCT_OFFSET (MonoLMF, pregs[1]), SLOT_NOREF);
- mini_gc_set_slot_type_from_fp (cfg, lmfOffset + MONO_STRUCT_OFFSET (MonoLMF, pregs[2]), SLOT_NOREF);
- mini_gc_set_slot_type_from_fp (cfg, lmfOffset + MONO_STRUCT_OFFSET (MonoLMF, pregs[3]), SLOT_NOREF);
- mini_gc_set_slot_type_from_fp (cfg, lmfOffset + MONO_STRUCT_OFFSET (MonoLMF, pregs[4]), SLOT_NOREF);
+ for (i = 0; i < 5; i++)
+ mini_gc_set_slot_type_from_fp (cfg, lmfOffset + MONO_STRUCT_OFFSET (MonoLMF, pregs) + i * sizeof(gulong), SLOT_NOREF);
/*---------------------------------------------------------------*/
/* On return from this call r2 have the address of the &lmf */
/* Set lmf.lmf_addr = jit_tls->lmf */
/*---------------------------------------------------------------*/
s390_stg (code, s390_r2, 0, s390_r13,
- G_STRUCT_OFFSET(MonoLMF, lmf_addr));
+ MONO_STRUCT_OFFSET(MonoLMF, lmf_addr));
mini_gc_set_slot_type_from_fp (cfg, lmfOffset + MONO_STRUCT_OFFSET (MonoLMF, lmf_addr), SLOT_NOREF);
/*---------------------------------------------------------------*/
/* Have our lmf.previous_lmf point to the last lmf */
/*---------------------------------------------------------------*/
s390_stg (code, s390_r0, 0, s390_r13,
- G_STRUCT_OFFSET(MonoLMF, previous_lmf));
+ MONO_STRUCT_OFFSET(MonoLMF, previous_lmf));
mini_gc_set_slot_type_from_fp (cfg, lmfOffset + MONO_STRUCT_OFFSET (MonoLMF, previous_lmf), SLOT_NOREF);
/*---------------------------------------------------------------*/
/*---------------------------------------------------------------*/
S390_SET (code, s390_r1, method);
s390_stg (code, s390_r1, 0, s390_r13,
- G_STRUCT_OFFSET(MonoLMF, method));
+ MONO_STRUCT_OFFSET(MonoLMF, method));
mini_gc_set_slot_type_from_fp (cfg, lmfOffset + MONO_STRUCT_OFFSET (MonoLMF, method), SLOT_NOREF);
/*---------------------------------------------------------------*/
/* save the current IP */
/*---------------------------------------------------------------*/
- s390_stg (code, STK_BASE, 0, s390_r13, G_STRUCT_OFFSET(MonoLMF, ebp));
+ s390_stg (code, STK_BASE, 0, s390_r13, MONO_STRUCT_OFFSET(MonoLMF, ebp));
s390_basr (code, s390_r1, 0);
- s390_stg (code, s390_r1, 0, s390_r13, G_STRUCT_OFFSET(MonoLMF, eip));
+ s390_stg (code, s390_r1, 0, s390_r13, MONO_STRUCT_OFFSET(MonoLMF, eip));
mini_gc_set_slot_type_from_fp (cfg, lmfOffset + MONO_STRUCT_OFFSET (MonoLMF, ebp), SLOT_NOREF);
mini_gc_set_slot_type_from_fp (cfg, lmfOffset + MONO_STRUCT_OFFSET (MonoLMF, eip), SLOT_NOREF);
/* Save general and floating point registers */
/*---------------------------------------------------------------*/
s390_stmg (code, s390_r2, s390_r12, s390_r13,
- G_STRUCT_OFFSET(MonoLMF, gregs[2]));
- mini_gc_set_slot_type_from_fp (cfg, lmfOffset + MONO_STRUCT_OFFSET (MonoLMF, gregs[0]), SLOT_NOREF);
- mini_gc_set_slot_type_from_fp (cfg, lmfOffset + MONO_STRUCT_OFFSET (MonoLMF, gregs[1]), SLOT_NOREF);
- mini_gc_set_slot_type_from_fp (cfg, lmfOffset + MONO_STRUCT_OFFSET (MonoLMF, gregs[2]), SLOT_NOREF);
- mini_gc_set_slot_type_from_fp (cfg, lmfOffset + MONO_STRUCT_OFFSET (MonoLMF, gregs[3]), SLOT_NOREF);
- mini_gc_set_slot_type_from_fp (cfg, lmfOffset + MONO_STRUCT_OFFSET (MonoLMF, gregs[4]), SLOT_NOREF);
- mini_gc_set_slot_type_from_fp (cfg, lmfOffset + MONO_STRUCT_OFFSET (MonoLMF, gregs[5]), SLOT_NOREF);
- mini_gc_set_slot_type_from_fp (cfg, lmfOffset + MONO_STRUCT_OFFSET (MonoLMF, gregs[6]), SLOT_NOREF);
- mini_gc_set_slot_type_from_fp (cfg, lmfOffset + MONO_STRUCT_OFFSET (MonoLMF, gregs[7]), SLOT_NOREF);
- mini_gc_set_slot_type_from_fp (cfg, lmfOffset + MONO_STRUCT_OFFSET (MonoLMF, gregs[8]), SLOT_NOREF);
- mini_gc_set_slot_type_from_fp (cfg, lmfOffset + MONO_STRUCT_OFFSET (MonoLMF, gregs[9]), SLOT_NOREF);
- mini_gc_set_slot_type_from_fp (cfg, lmfOffset + MONO_STRUCT_OFFSET (MonoLMF, gregs[10]), SLOT_NOREF);
-
- fpOffset = lmfOffset + MONO_STRUCT_OFFSET (MonoLMF, fregs[0]);
+ MONO_STRUCT_OFFSET(MonoLMF, gregs) + 2 * sizeof(gulong));
+ for (i = 0; i < 11; i++)
+ mini_gc_set_slot_type_from_fp (cfg, lmfOffset + MONO_STRUCT_OFFSET (MonoLMF, gregs) + i * sizeof(gulong), SLOT_NOREF);
+
+ fpOffset = lmfOffset + MONO_STRUCT_OFFSET (MonoLMF, fregs);
for (i = 0; i < 16; i++) {
s390_std (code, i, 0, s390_r13,
- G_STRUCT_OFFSET(MonoLMF, fregs[i]));
+ MONO_STRUCT_OFFSET(MonoLMF, fregs) + i * sizeof(gulong));
mini_gc_set_slot_type_from_fp (cfg, fpOffset, SLOT_NOREF);
fpOffset += sizeof(double);
}
/* Restore the parameter registers now that we've set up the lmf */
/*---------------------------------------------------------------*/
s390_lmg (code, s390_r2, s390_r6, s390_r13,
- G_STRUCT_OFFSET(MonoLMF, pregs[0]));
+ MONO_STRUCT_OFFSET(MonoLMF, pregs));
}
if (cfg->method->save_lmf)