@@ -1832,6 +1832,7 @@ aot_compile_op_call(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx,
18321832 aot_set_last_error ("llvm build load failed." );
18331833 goto fail ;
18341834 }
1835+ LLVMSetAlignment (ext_ret , 4 );
18351836 PUSH (ext_ret , ext_ret_types [i ]);
18361837 }
18371838 }
@@ -2068,6 +2069,7 @@ call_aot_call_indirect_func(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx,
20682069 aot_set_last_error ("llvm build load failed." );
20692070 return false;
20702071 }
2072+ LLVMSetAlignment (value_rets [i ], 4 );
20712073 cell_num += wasm_value_type_cell_num_internal (wasm_ret_types [i ],
20722074 comp_ctx -> pointer_size );
20732075 }
@@ -2699,6 +2701,7 @@ aot_compile_op_call_indirect(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx,
26992701 aot_set_last_error ("llvm build load failed." );
27002702 goto fail ;
27012703 }
2704+ LLVMSetAlignment (ext_ret , 4 );
27022705 LLVMAddIncoming (result_phis [i ], & ext_ret , & block_curr , 1 );
27032706 }
27042707 }
@@ -3130,6 +3133,7 @@ aot_compile_op_call_ref(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx,
31303133 aot_set_last_error ("llvm build load failed." );
31313134 goto fail ;
31323135 }
3136+ LLVMSetAlignment (ext_ret , 4 );
31333137 LLVMAddIncoming (result_phis [i ], & ext_ret , & block_curr , 1 );
31343138 }
31353139 }
@@ -3205,6 +3209,7 @@ aot_compile_op_call_ref(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx,
32053209 aot_set_last_error ("llvm build load failed." );
32063210 goto fail ;
32073211 }
3212+ LLVMSetAlignment (ext_ret , 4 );
32083213 LLVMAddIncoming (result_phis [i ], & ext_ret , & block_curr , 1 );
32093214 }
32103215 }
0 commit comments