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

polyval: Refactor in prep for soft backend rewrite #8

Merged
merged 1 commit into from
Sep 3, 2019

Conversation

tarcieri
Copy link
Member

@tarcieri tarcieri commented Sep 3, 2019

This incrementally incorporates some of the refactoring changes from #7 in order to simplify the diff for that PR (and because those changes seem generally good regardless).

This incrementally incorporates some of the refactoring changes from #7
in order to simplify the diff for that PR (and because those changes
seem generally good regardless).
@tarcieri tarcieri merged commit fc963a5 into master Sep 3, 2019
@tarcieri tarcieri deleted the polyval/refactor branch September 3, 2019 15:20
Copy link
Member

@newpavlov newpavlov left a comment

Choose a reason for hiding this comment

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

Looks good!

clmul::PseudoOp::PCLMULHQLQDQ => _mm_clmulepi64_si128(a, b, 0x01),
clmul::PseudoOp::PCLMULLQHQDQ => _mm_clmulepi64_si128(a, b, 0x10),
clmul::PseudoOp::PCLMULHQHQDQ => _mm_clmulepi64_si128(a, b, 0x11),
unsafe fn pclmulqdq(a: __m128i, b: __m128i, imm: u8) -> __m128i {
Copy link
Member

@newpavlov newpavlov Sep 3, 2019

Choose a reason for hiding this comment

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

Do we need this separate function? IIUC you can inline this code directly to Backend impl. Also target_feature attribute looks redundant, since you already check that this module is built with those features enabled. To be safe you could add a compilation error at the top of this module. Or is it a preparation for future CPUID detection?

Copy link
Member Author

Choose a reason for hiding this comment

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

I can definitely look into doing a lot of additional cleanups after #7 lands, including CPUID detection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants