We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b8fed32 commit b617f4fCopy full SHA for b617f4f
1 file changed
src/mono/mono/mini/method-to-ir.c
@@ -2232,7 +2232,16 @@ static MonoInst*
2232
mono_emit_widen_call_res (MonoCompile *cfg, MonoInst *ins, MonoMethodSignature *fsig)
2233
{
2234
if (!MONO_TYPE_IS_VOID (fsig->ret)) {
2235
- if ((fsig->pinvoke || LLVM_ENABLED) && !m_type_is_byref (fsig->ret)) {
+ // FIXME
2236
+ // LLVM code doesn't uses zero extend the full word while jit expects it.
2237
+ // A proper fix would be to detect if we are actually using llvm code from aot images
2238
+ // or make sure llvm code actually zero extends the return.
2239
+#ifdef MONO_ARCH_LLVM_SUPPORTED
2240
+ gboolean might_use_llvm = TRUE;
2241
+#else
2242
+ gboolean might_use_llvm = FALSE;
2243
+#endif
2244
+ if ((fsig->pinvoke || might_use_llvm) && !m_type_is_byref (fsig->ret)) {
2245
int widen_op = -1;
2246
2247
/*
0 commit comments