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

Support remaining Aes intrinsics on Arm #48525

Merged
merged 1 commit into from
Feb 22, 2021

Conversation

fanyang-mono
Copy link
Member

@fanyang-mono fanyang-mono commented Feb 19, 2021

Fixes #42273:

Add support for

  • PolynomialMultiplyWideningLower
  • PolynomialMultiplyWideningUpper

@@ -841,6 +841,11 @@ static SimdIntrinsic crypto_aes_methods [] = {
{SN_get_IsSupported}
};

static SimdIntrinsic neon_aes_methods [] = {
{SN_PolynomialMultiplyWideningLower, OP_XOP_X_X_X, SIMD_OP_ARM64_PMULL64_LOWER},
Copy link
Contributor

Choose a reason for hiding this comment

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

I just realized that for some of these we are only specifying an enum value (SN_whatever), and for some of them we are specifying op codes. Why the difference?

Copy link
Member Author

Choose a reason for hiding this comment

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

It depends if it is necessary to have the opcode or not. For SN_get_IsSupported, all we needed to to was

if (id == SN_get_IsSupported) {
			EMIT_NEW_ICONST (cfg, ins, supported ? 1 : 0);
			return ins;
		}

For the methods with op codes that I have been working on, they went through this common logic:
https://github.com/dotnet/runtime/blob/master/src/mono/mono/mini/simd-intrinsics.c#L987-L1021

@fanyang-mono fanyang-mono merged commit e56b35c into dotnet:master Feb 22, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Mar 24, 2021
@fanyang-mono fanyang-mono deleted the arm_Aes_2 branch May 27, 2021 14:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[mono] Tracking: Implement System.Runtime.Intrinsics.Arm.Aes
3 participants