Skip to content

Commit 787d5dd

Browse files
[release/7.0] Fixed clang15 build issues (#78146)
* [ppc64le] Implementation of mono_arch_get_delegate_virtual_invoke_impl method for ppc64le architecture * Fixed clang15 build issues and returning address of sc_sp instead of value Co-authored-by: Alhad Deshpande <[email protected]>
1 parent 9dd2bbc commit 787d5dd

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/mono/mono/mini/mini-ppc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2777,7 +2777,7 @@ handle_thunk (MonoCompile *cfg, guchar *code, const guchar *target)
27772777
cfg->arch.thunks = cfg->thunks;
27782778
cfg->arch.thunks_size = cfg->thunk_area;
27792779
#ifdef THUNK_ADDR_ALIGNMENT
2780-
cfg->arch.thunks = ALIGN_TO(cfg->arch.thunks, THUNK_ADDR_ALIGNMENT);
2780+
cfg->arch.thunks = (guint8 *)ALIGN_TO(cfg->arch.thunks, THUNK_ADDR_ALIGNMENT);
27812781
#endif
27822782
}
27832783
thunks = cfg->arch.thunks;
@@ -5930,7 +5930,7 @@ host_mgreg_t*
59305930
mono_arch_context_get_int_reg_address (MonoContext *ctx, int reg)
59315931
{
59325932
if (reg == ppc_r1)
5933-
return (host_mgreg_t)(gsize)MONO_CONTEXT_GET_SP (ctx);
5933+
return (host_mgreg_t *)(gsize)&ctx->sc_sp;
59345934

59355935
return &ctx->regs [reg];
59365936
}

src/mono/mono/mini/tramp-ppc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -672,10 +672,10 @@ mono_arch_get_call_target (guint8 *code)
672672
}
673673
#if defined(TARGET_POWERPC64) && !defined(PPC_USES_FUNCTION_DESCRIPTOR)
674674
else if (((guint32*)(code - 32)) [0] >> 26 == 15) {
675-
guint8 *thunk = GET_MEMORY_SLOT_THUNK_ADDRESS((guint32*)(code - 32));
675+
guint8 *thunk = (guint8 *)GET_MEMORY_SLOT_THUNK_ADDRESS((guint32*)(code - 32));
676676
return thunk;
677677
} else if (((guint32*)(code - 4)) [0] >> 26 == 15) {
678-
guint8 *thunk = GET_MEMORY_SLOT_THUNK_ADDRESS((guint32*)(code - 4));
678+
guint8 *thunk = (guint8 *)GET_MEMORY_SLOT_THUNK_ADDRESS((guint32*)(code - 4));
679679
return thunk;
680680
}
681681
#endif

0 commit comments

Comments
 (0)