mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-07-15 08:48:33 +00:00
Fix code guideline check issues
This commit is contained in:
parent
d225dca63d
commit
3da7289821
|
@ -5657,7 +5657,7 @@ lower_callbc(JitCompContext *cc, x86::Assembler &a, bh_list *jmp_info_list,
|
|||
JitReg rdx_hreg = jit_reg_new(JIT_REG_KIND_I64, REG_RDX_IDX);
|
||||
JitReg xmm0_f32_hreg = jit_reg_new(JIT_REG_KIND_F32, 0);
|
||||
JitReg xmm0_f64_hreg = jit_reg_new(JIT_REG_KIND_F64, 0);
|
||||
JitReg ret_reg = *(jit_insn_opnd (insn, 0));
|
||||
JitReg ret_reg = *(jit_insn_opnd(insn, 0));
|
||||
JitReg func_reg = *(jit_insn_opnd(insn, 2));
|
||||
JitReg src_reg;
|
||||
|
||||
|
|
|
@ -338,8 +338,8 @@ copy_block_arities(JitCompContext *cc, JitReg dst_frame_sp, uint8 *dst_types,
|
|||
if (i == 0 && p_first_res_reg)
|
||||
*p_first_res_reg = value;
|
||||
else
|
||||
GEN_INSN(STI32, value, dst_frame_sp,
|
||||
NEW_CONST(I32, offset_dst * 4));
|
||||
GEN_INSN(STI32, value, dst_frame_sp,
|
||||
NEW_CONST(I32, offset_dst * 4));
|
||||
offset_src++;
|
||||
offset_dst++;
|
||||
break;
|
||||
|
|
|
@ -66,8 +66,7 @@ fail:
|
|||
|
||||
/* Push results */
|
||||
static bool
|
||||
post_return(JitCompContext *cc, const WASMType *func_type,
|
||||
JitReg first_res)
|
||||
post_return(JitCompContext *cc, const WASMType *func_type, JitReg first_res)
|
||||
{
|
||||
uint32 i, n;
|
||||
JitReg value;
|
||||
|
@ -98,7 +97,7 @@ post_return(JitCompContext *cc, const WASMType *func_type,
|
|||
value = first_res;
|
||||
}
|
||||
else {
|
||||
value = jit_cc_new_reg_I64(cc);
|
||||
value = jit_cc_new_reg_I64(cc);
|
||||
GEN_INSN(LDI64, value, cc->fp_reg,
|
||||
NEW_CONST(I32, offset_of_local(n)));
|
||||
}
|
||||
|
@ -124,7 +123,7 @@ post_return(JitCompContext *cc, const WASMType *func_type,
|
|||
value = first_res;
|
||||
}
|
||||
else {
|
||||
value = jit_cc_new_reg_F64(cc);
|
||||
value = jit_cc_new_reg_F64(cc);
|
||||
GEN_INSN(LDF64, value, cc->fp_reg,
|
||||
NEW_CONST(I32, offset_of_local(n)));
|
||||
}
|
||||
|
|
|
@ -3846,8 +3846,9 @@ wasm_interp_call_wasm(WASMModuleInstance *module_inst, WASMExecEnv *exec_env,
|
|||
JitGlobals *jit_globals = jit_compiler_get_jit_globals();
|
||||
JitInterpSwitchInfo info;
|
||||
WASMType *func_type = function->u.func->func_type;
|
||||
uint8 type = func_type->result_count ?
|
||||
func_type->types[func_type->param_count] : VALUE_TYPE_VOID;
|
||||
uint8 type = func_type->result_count
|
||||
? func_type->types[func_type->param_count]
|
||||
: VALUE_TYPE_VOID;
|
||||
|
||||
#if WASM_ENABLE_REF_TYPES != 0
|
||||
if (type == VALUE_TYPE_EXTERNREF || type == VALUE_TYPE_FUNCREF)
|
||||
|
@ -3863,18 +3864,24 @@ wasm_interp_call_wasm(WASMModuleInstance *module_inst, WASMExecEnv *exec_env,
|
|||
if (func_type->result_count) {
|
||||
switch (type) {
|
||||
case VALUE_TYPE_I32:
|
||||
*(frame->sp - function->ret_cell_num) = info.out.ret.ival[0];
|
||||
*(frame->sp - function->ret_cell_num) =
|
||||
info.out.ret.ival[0];
|
||||
break;
|
||||
case VALUE_TYPE_I64:
|
||||
*(frame->sp - function->ret_cell_num) = info.out.ret.ival[0];
|
||||
*(frame->sp - function->ret_cell_num + 1) = info.out.ret.ival[1];
|
||||
*(frame->sp - function->ret_cell_num) =
|
||||
info.out.ret.ival[0];
|
||||
*(frame->sp - function->ret_cell_num + 1) =
|
||||
info.out.ret.ival[1];
|
||||
break;
|
||||
case VALUE_TYPE_F32:
|
||||
*(frame->sp - function->ret_cell_num) = info.out.ret.fval[0];
|
||||
*(frame->sp - function->ret_cell_num) =
|
||||
info.out.ret.fval[0];
|
||||
break;
|
||||
case VALUE_TYPE_F64:
|
||||
*(frame->sp - function->ret_cell_num) = info.out.ret.fval[0];
|
||||
*(frame->sp - function->ret_cell_num + 1) = info.out.ret.fval[1];
|
||||
*(frame->sp - function->ret_cell_num) =
|
||||
info.out.ret.fval[0];
|
||||
*(frame->sp - function->ret_cell_num + 1) =
|
||||
info.out.ret.fval[1];
|
||||
break;
|
||||
default:
|
||||
bh_assert(0);
|
||||
|
|
Loading…
Reference in New Issue
Block a user