Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/mono/mono/mini/method-to-ir.c
Original file line number Diff line number Diff line change
Expand Up @@ -2232,7 +2232,16 @@ static MonoInst*
mono_emit_widen_call_res (MonoCompile *cfg, MonoInst *ins, MonoMethodSignature *fsig)
{
if (!MONO_TYPE_IS_VOID (fsig->ret)) {
if ((fsig->pinvoke || LLVM_ENABLED) && !m_type_is_byref (fsig->ret)) {
// FIXME
// LLVM code doesn't uses zero extend the full word while jit expects it.
// A proper fix would be to detect if we are actually using llvm code from aot images
// or make sure llvm code actually zero extends the return.
#ifdef MONO_ARCH_LLVM_SUPPORTED
gboolean might_use_llvm = TRUE;
#else
gboolean might_use_llvm = FALSE;
#endif
if ((fsig->pinvoke || might_use_llvm) && !m_type_is_byref (fsig->ret)) {
int widen_op = -1;

/*
Expand Down