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

x86_64: Use byte-wise atomic load for first load in 128-bit RMWs #22

Merged
merged 3 commits into from
Jul 28, 2022

Conversation

taiki-e
Copy link
Owner

@taiki-e taiki-e commented Jul 27, 2022

Based on the code generated for DW RMWs by LLVM.

Currently, the first load is done by cmpxchg16b, which is not efficient because it means that cmpxchg16b is called at least twice. (although it is actually fast enough in some cases because we use a hack that assumes initial values)

@taiki-e taiki-e added the O-x86 Target: x86/x64 processors label Jul 27, 2022
@taiki-e taiki-e changed the title x86_64: Use byte-wise atomic load for first load in RMWs x86_64: Use byte-wise atomic load for first load in 128-bit RMWs Jul 27, 2022
@taiki-e taiki-e force-pushed the cmpxchg16b-rmw branch 3 times, most recently from f9090f0 to 1334448 Compare July 27, 2022 16:56
@taiki-e taiki-e force-pushed the cmpxchg16b-rmw branch 5 times, most recently from 3326cda to 44e14f3 Compare July 28, 2022 14:31
@taiki-e
Copy link
Owner Author

taiki-e commented Jul 28, 2022

bors r+

@bors
Copy link
Contributor

bors bot commented Jul 28, 2022

@bors bors bot merged commit ed23f5f into main Jul 28, 2022
@bors bors bot deleted the cmpxchg16b-rmw branch July 28, 2022 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-x86 Target: x86/x64 processors
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant