Skip to content

Conversation

@lum1n0us
Copy link
Contributor

No description provided.

i32 = jit_cc_get_const_I32(cc, arg_reg);
imm.setValue(i32);
a.mov(regs_arg[i], imm);
a.mov(regs_arg[0][i], imm);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding is we should or had better sign-extend the 32-bit imm/register into 64-bit register, we did in that way in wasm_runtime_invoke_native of x86-64 version. Had better check the ABI carefully, if yes, here we should use the original code.

i32 = jit_cc_get_const_I32(cc, arg_reg);
imm.setValue(i32);
a.mov(regs_arg[i], imm);
a.mov(regs_arg[0][i], imm);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding is we should or had better sign-extend the 32-bit imm/register into 64-bit register, we did in that way in wasm_runtime_invoke_native of x86-64 version. Had better check the ABI carefully, if yes, here we should use the original code.

}
else {
a.mov(regs_arg[i], regs_i32[jit_reg_no(arg_reg)]);
a.mov(regs_arg[0][i], regs_i32[jit_reg_no(arg_reg)]);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above, seems that we should change the original code to a.movsxd(regs_arg[i], regs_i32[jit_reg_no(arg_reg)])

}
else {
a.mov(regs_arg[i], regs_i32[jit_reg_no(arg_reg)]);
a.mov(regs_arg[0][i], regs_i32[jit_reg_no(arg_reg)]);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above, seems that we should change the original code to a.movsxd(regs_arg[i], regs_i32[jit_reg_no(arg_reg)])

@wenyongh wenyongh merged commit 87b259a into bytecodealliance:dev/fast_jit Apr 27, 2022
It involves an C11 feature and leaves us a compiler error:
"an anonymous union may only have public non-static data member"
@lum1n0us lum1n0us deleted the impl_memory_grow branch May 10, 2022 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants