Skip to content

Commit

Permalink
Fixed clang15 build issues (#78102)
Browse files Browse the repository at this point in the history
* [ppc64le] Fixed thunk address 8 byte alignment issue

* Fixed FSharp crash issue

* [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
  • Loading branch information
alhad-deshpande authored Nov 9, 2022
1 parent feb9968 commit 3bcdb34
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/mono/mono/mini/mini-ppc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2777,7 +2777,7 @@ handle_thunk (MonoCompile *cfg, guchar *code, const guchar *target)
cfg->arch.thunks = cfg->thunks;
cfg->arch.thunks_size = cfg->thunk_area;
#ifdef THUNK_ADDR_ALIGNMENT
cfg->arch.thunks = ALIGN_TO(cfg->arch.thunks, THUNK_ADDR_ALIGNMENT);
cfg->arch.thunks = (guint8 *)ALIGN_TO(cfg->arch.thunks, THUNK_ADDR_ALIGNMENT);
#endif
}
thunks = cfg->arch.thunks;
Expand Down Expand Up @@ -5930,7 +5930,7 @@ host_mgreg_t*
mono_arch_context_get_int_reg_address (MonoContext *ctx, int reg)
{
if (reg == ppc_r1)
return (host_mgreg_t)(gsize)MONO_CONTEXT_GET_SP (ctx);
return (host_mgreg_t *)(gsize)&ctx->sc_sp;

return &ctx->regs [reg];
}
Expand Down
4 changes: 2 additions & 2 deletions src/mono/mono/mini/tramp-ppc.c
Original file line number Diff line number Diff line change
Expand Up @@ -672,10 +672,10 @@ mono_arch_get_call_target (guint8 *code)
}
#if defined(TARGET_POWERPC64) && !defined(PPC_USES_FUNCTION_DESCRIPTOR)
else if (((guint32*)(code - 32)) [0] >> 26 == 15) {
guint8 *thunk = GET_MEMORY_SLOT_THUNK_ADDRESS((guint32*)(code - 32));
guint8 *thunk = (guint8 *)GET_MEMORY_SLOT_THUNK_ADDRESS((guint32*)(code - 32));
return thunk;
} else if (((guint32*)(code - 4)) [0] >> 26 == 15) {
guint8 *thunk = GET_MEMORY_SLOT_THUNK_ADDRESS((guint32*)(code - 4));
guint8 *thunk = (guint8 *)GET_MEMORY_SLOT_THUNK_ADDRESS((guint32*)(code - 4));
return thunk;
}
#endif
Expand Down

0 comments on commit 3bcdb34

Please sign in to comment.