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

add support for pclmulqdq intrinsic #3640

Merged
merged 2 commits into from
Jun 8, 2024
Merged

Conversation

folkertdev
Copy link
Contributor

@folkertdev folkertdev commented May 28, 2024

This instruction is required in fast implementations of the crc32 checksum algorithm, and used in the https://crates.io/crates/crc32fast and https://crates.io/crates/zlib-rs crates.

Some questions from my side

  • is my method for decomposing a __m128i into two separate i64 values allright?

@folkertdev folkertdev force-pushed the add-pclmulqdq branch 3 times, most recently from 61312da to 2266db9 Compare May 28, 2024 16:19
@folkertdev folkertdev changed the title add support for pclmulqdq add support for pclmulqdq intrinsic May 28, 2024
@folkertdev
Copy link
Contributor Author

@rustbot ready

@rustbot rustbot added the S-waiting-on-review Status: Waiting for a review to complete label May 29, 2024
Copy link
Member

@RalfJung RalfJung left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

is my method for decomposing a __m128i into two separate i64 values allright?

A transmute is one option; just accessing the two fields would also work but would rely on the way that type is declared. I think we already have similar transmutes for other x86 intrinsics, so this is fine.

src/shims/x86/mod.rs Outdated Show resolved Hide resolved
src/shims/x86/mod.rs Outdated Show resolved Hide resolved
src/shims/x86/mod.rs Outdated Show resolved Hide resolved
src/shims/x86/mod.rs Show resolved Hide resolved
src/shims/x86/mod.rs Outdated Show resolved Hide resolved
@RalfJung
Copy link
Member

RalfJung commented Jun 8, 2024

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: Waiting for the PR author to address review comments and removed S-waiting-on-review Status: Waiting for a review to complete labels Jun 8, 2024
@folkertdev folkertdev force-pushed the add-pclmulqdq branch 2 times, most recently from b580ae6 to 0652638 Compare June 8, 2024 14:17
src/shims/x86/mod.rs Outdated Show resolved Hide resolved
src/shims/x86/mod.rs Outdated Show resolved Hide resolved
@folkertdev folkertdev force-pushed the add-pclmulqdq branch 2 times, most recently from 1dcc98b to 9a5cce7 Compare June 8, 2024 14:35
@folkertdev
Copy link
Contributor Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Waiting for a review to complete and removed S-waiting-on-author Status: Waiting for the PR author to address review comments labels Jun 8, 2024
@RalfJung
Copy link
Member

RalfJung commented Jun 8, 2024

In future please avoid force-pushing (except when there are conflicts that need resolving) until the PR is done. Github is pretty bad at keeping track of force-pushes, making it basically impossible to tell what changed since my last review.

src/shims/x86/mod.rs Outdated Show resolved Hide resolved
src/shims/x86/mod.rs Outdated Show resolved Hide resolved
@RalfJung
Copy link
Member

RalfJung commented Jun 8, 2024

Thanks. :-)

@bors r+

@bors
Copy link
Contributor

bors commented Jun 8, 2024

📌 Commit 6a86688 has been approved by RalfJung

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Jun 8, 2024

⌛ Testing commit 6a86688 with merge e191fee...

@bors
Copy link
Contributor

bors commented Jun 8, 2024

☀️ Test successful - checks-actions
Approved by: RalfJung
Pushing e191fee to master...

@bors bors merged commit e191fee into rust-lang:master Jun 8, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Waiting for a review to complete
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants