cinfo->args [n].reg = fr;
fr ++;
FP_ALSO_IN_REG (gr ++);
+#if !defined(__mono_ppc64__)
if (size == 8)
FP_ALSO_IN_REG (gr ++);
+#endif
ALWAYS_ON_STACK (stack_size += size);
} else {
cinfo->args [n].offset = PPC_STACK_PARAM_OFFSET + stack_size;
cinfo->args [n].size = 4;
/* It was 7, now it is 8 in LinuxPPC */
- if (fr <= PPC_LAST_FPARG_REG) {
+ if (fr <= PPC_LAST_FPARG_REG
+ // For non-native vararg calls the parms must go in storage
+ && !(!sig->pinvoke && (sig->call_convention == MONO_CALL_VARARG))
+ ) {
cinfo->args [n].regtype = RegTypeFP;
cinfo->args [n].reg = fr;
fr ++;
case MONO_TYPE_R8:
cinfo->args [n].size = 8;
/* It was 7, now it is 8 in LinuxPPC */
- if (fr <= PPC_LAST_FPARG_REG) {
+ if (fr <= PPC_LAST_FPARG_REG
+ // For non-native vararg calls the parms must go in storage
+ && !(!sig->pinvoke && (sig->call_convention == MONO_CALL_VARARG))
+ ) {
cinfo->args [n].regtype = RegTypeFP;
cinfo->args [n].reg = fr;
fr ++;
m->ret->inst_c0 = m->ret->dreg = ppc_r3;
} else {
/* FIXME: handle long values? */
- switch (mini_get_underlying_type (m, sig->ret)->type) {
+ switch (mini_get_underlying_type (sig->ret)->type) {
case MONO_TYPE_VOID:
break;
case MONO_TYPE_R4:
}
}
}
- } else {
+ // If "delegate->method_ptr" is null mono_get_addr_from_ftnptr will fail if
+ // ftnptrs are being used. "method" would end up null on archtitectures without
+ // ftnptrs so we can just skip this.
+ } else if (delegate->method_ptr) {
ji = mono_jit_info_table_find (domain, mono_get_addr_from_ftnptr (delegate->method_ptr));
if (ji)
method = jinfo_get_method (ji);
} while (0)
/* MS_BLOCK_SIZE must be a multiple of the system pagesize, which for some
- archs is 64k. */
-#if defined(TARGET_POWERPC64) && _CALL_ELF == 2
+ architectures is 64k. */
+#if defined(TARGET_POWERPC64)
#define ARCH_MIN_MS_BLOCK_SIZE (64*1024)
#define ARCH_MIN_MS_BLOCK_SIZE_SHIFT 16
#endif