Skip to content
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

[wasm] Enable System.Numerics vectors SIMD #78068

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
<linker>
<assembly fullname="System.Private.CoreLib">
<type fullname="System.Numerics.Vector">
<method signature="System.Boolean get_IsHardwareAccelerated()" body="stub" value="false" />
</type>
<type fullname="System.Environment">
<method signature="System.Int32 get_ProcessorCount()" body="stub" value="1" />
</type>
Expand Down
14 changes: 14 additions & 0 deletions src/mono/mono/mini/simd-intrinsics.c
Original file line number Diff line number Diff line change
Expand Up @@ -4534,6 +4534,20 @@ arch_emit_simd_intrinsics (const char *class_ns, const char *class_name, MonoCom
return emit_vector64_vector128_t (cfg, cmethod, fsig, args);
}

if (!strcmp (class_ns, "System.Numerics") && !strcmp (class_name, "Vector")){
return emit_sri_vector (cfg, cmethod, fsig, args);
}

if (!strcmp (class_ns, "System.Numerics") && !strcmp (class_name, "Vector`1")){
return emit_vector64_vector128_t (cfg, cmethod, fsig, args);
}

if (!strcmp (class_ns, "System.Numerics")) {
//if (!strcmp ("Vector2", class_name) || !strcmp ("Vector4", class_name) || !strcmp ("Vector3", class_name))
if (!strcmp ("Vector4", class_name))
return emit_vector_2_3_4 (cfg, cmethod, fsig, args);
}

return NULL;
}
#else
Expand Down