-
Notifications
You must be signed in to change notification settings - Fork 5k
[mono] Implement Arm intrinsics: ArmBase, Crc32 #34240
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
Conversation
Is |
It's mono, but it's based on LLVM naming convention for features (see |
@vargaz could you please re-review? |
# Conflicts: # src/mono/mono/mini/mini-ops.h
@tannergooding I've just tried the latest daily .NET Core SDK (5.0.100-preview.3.20181.13) with System.Runtime.Intrinsics.Experimental (5.0.0-preview.3.20181.9) on my Cortex A57:
Any idea why /proc/cpuinfo
|
@davidwrighton, possibly something missed in the fixes that just went in? Edit:
And then: |
@EgorBo, looks like it probably doesn't have some of the fixes that went in recently. The SDK reports the following, which is 13 days old (bc28cbef85):
There were some important fixes (such as #34139) that only went in about 5 days ago. |
@tannergooding thanks, forgot that daily sdks are not entirely daily :) I noticed an API problem here it took me a while to understand.
|
@EgorBo This sounds as the issue I faced recently (see my comment #34107 (comment)). Should be fixed now. |
um.. I don't see how it can be implemented in Jit, here is what I mean: https://sharplab.io/#v2:EYLgHgbALANALiAlgGwD4AEBMBGAsAKAKP3QGYACLcgQQCcBbAIQEMBnAUwIG8Dy/KK6bBHLAA9mOTkAkqwDKAVwAOSsbTjsAJuQC8APnJxaC9gG5e/C3zKVMNBtCvke+fm4GVhoiVNmKVahra+obGZk4AvgRRhCSCdnIAFsyYAKwiIPZMbJz4Lm42QiLikjLyyqrqWroGAGbMyBym5AD0LeTsAHQA5p3k9ACe5IkA7uSaYuysAHYA5HDkrBWB5Ekp6U5ObavJaSITU3MLyQBu7OSIcKzkYiPTWY74MQSFdkIA7Nxb7XJiFwvICQAa2uyEQQPO0nIAGNEuxoUDyLU1Dt1iJmCdmChmMAUJchnDaLk3NtgAoFoh7tIADL/WbXABE0IaUhKUjo2Q4LQ50BAIG67DgAH0/MsqpoABQASgZTkKXjZ5AAYhJpTVUXtOjyoJ1RQFxc1tuh3tcjCZokA=== |
@EgorBo Ah okay - thanks for explanation! I mixed this up with another issue. I guess we could workaround this by defining Sha256.Arm64 class that contains only one property IsSupported always returning false but this just doesn't sound right to me. Perhaps deriving Sha256 class from ArmBase wasn't a good idea. |
Yes, we would need to have an explicit class that plays into the normal lookup checks. This is probably something that should have an issue and should go through API review. |
Implement
System.Runtime.Intrinsics.Arm.ArmBase
and*.Crc32
intrinsics for Arm64 with LLVM-backend.ArmBase
is enabled by default,Crc32
for LLVM-AOT can be enabled either viamcpu=native
ormattr=+crc
(e.g. when we crosscompile for iOS).Asm: (
--aot=llvm,mcpu=native System.Private.CoreLib.dll
on Cortex-A57):@tannergooding @echesakovMSFT Could you please take a quick look at asm ^ if it's ok or not.
Vector64<T>
,Vector128<T>
,Vector<T>
are not enabled yet.