Skip to content

Commit

Permalink
set alignment 4 when loading multi return value for all call opcodes
Browse files Browse the repository at this point in the history
  • Loading branch information
TianlongLiang committed Dec 12, 2024
1 parent 64ac027 commit 7789650
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/iwasm/compilation/aot_emit_function.c
Original file line number Diff line number Diff line change
Expand Up @@ -2700,6 +2700,7 @@ aot_compile_op_call_indirect(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx,
aot_set_last_error("llvm build load failed.");
goto fail;
}
LLVMSetAlignment(ext_ret, 4);
LLVMAddIncoming(result_phis[i], &ext_ret, &block_curr, 1);
}
}
Expand Down Expand Up @@ -3131,6 +3132,7 @@ aot_compile_op_call_ref(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx,
aot_set_last_error("llvm build load failed.");
goto fail;
}
LLVMSetAlignment(ext_ret, 4);
LLVMAddIncoming(result_phis[i], &ext_ret, &block_curr, 1);
}
}
Expand Down Expand Up @@ -3206,6 +3208,7 @@ aot_compile_op_call_ref(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx,
aot_set_last_error("llvm build load failed.");
goto fail;
}
LLVMSetAlignment(ext_ret, 4);
LLVMAddIncoming(result_phis[i], &ext_ret, &block_curr, 1);
}
}
Expand Down

0 comments on commit 7789650

Please sign in to comment.