-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Have mono handle the vector as APIs that grow or shrink the vector type #104445
Conversation
Tagging subscribers to this area: @steveisok, @lambdageek |
72c830d
to
7b3f132
Compare
7b3f132
to
e1d8614
Compare
29a3d0d
to
c30574b
Compare
c30574b
to
70cb4bd
Compare
8fb319d
to
a8cf3ba
Compare
|
||
res_typed [0] = v1_typed [0]; | ||
res_typed [1] = v1_typed [1]; | ||
res_typed [2] = 0; |
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.
There might be a problem here - if the v3 is in a stack local, it's 16 bytes wide and you might need to zero [3]
. I'm not sure whether res
can be a non-stack address though...
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.
I had code earlier that tried to always handle it as 16-bytes, but it didn't help.
Notably, I wouldn't expect the need to explicitly zero that space anyways as it would be considered padding space and should be ignored when loaded. Otherwise it would risk corrupting other operations, like Sum.
I don't know a lot about the minijit side of things, but I can try to look into the interp stuff next week. |
e29efbc
to
8ef0ee9
Compare
8ef0ee9
to
d1f1b9f
Compare
9388349
to
d46dc0c
Compare
I'll try to reproduce the wasm interp failures locally and see if I can figure them out. The minijit one is way beyond my knowledge, but if you're stuck and no one else can help, you can tag me in for that too. |
Thanks much! For the minijit one I'm pretty sure I understand the basic problem but I'd like to at least get the larger interp failures addressed first 😅 |
I haven't been able to run this locally because wasm builds are still broken for me by the libz stuff, which also seems to have broken codespaces. I'll see if I can get a successful build on my windows device and troubleshoot there. |
This one:
Appears to be an InvalidProgramException in transform.c's handling of CEE_RET, which looks like this: if (td->sp > td->stack) {
mono_error_set_generic_error (error, "System", "InvalidProgramException", "stack overflow in CEE_RET");
goto exit;
} This suggests that something in this PR is unbalancing the interpreter stack. EDIT: Specifically in Ascii.HasMatch |
OK, the missing ceq is a red herring, disabling the optimization responsible for that doesn't fix it. EDIT: I think |
Changing emit_common_simd_epilogue (TransformData *td, MonoClass *vector_klass, MonoMethodSignature *csignature, int vector_size, gboolean allow_void)
{
+ if (csignature->hasthis)
+ td->sp--;
td->sp -= csignature->param_count; I'm not sure that's quite right though. |
Thanks so much for the help here! I believe the new commit should correctly handle instance methods more generally speaking now. I'll still want to fix the jiterpreter to handle these new cases as well and ensure the MonoJIT/AOT path is passing, but I think I should be unblocked now! |
Now that the same size bitcasts are well handled and showing the expected perf improvements, I plan on cleaning this up next week, but I expect it won't land for .NET 9 before the Preview 7 snap |
Going to close this one. There's some other changes that are needed for mono-wasm before it can be done there (namely support for |
No description provided.