-
Notifications
You must be signed in to change notification settings - Fork 749
Impl memory grow #1123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Impl memory grow #1123
Conversation
| 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); |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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)]); |
There was a problem hiding this comment.
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)]); |
There was a problem hiding this comment.
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)])
fc63772 to
b5c7340
Compare
It involves an C11 feature and leaves us a compiler error: "an anonymous union may only have public non-static data member"
No description provided.