This is an archive of the discontinued LLVM Phabricator instance.

[X86] WaitPKG intrinsics
ClosedPublic

Authored by GBuella on Apr 4 2018, 4:52 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

GBuella created this revision.Apr 4 2018, 4:52 AM
This revision is now accepted and ready to land.Apr 4 2018, 9:59 AM
GBuella updated this revision to Diff 141319.Apr 6 2018, 5:14 AM

Using the modified LLVM intrinsics from D45253.

craig.topper accepted this revision.Apr 6 2018, 9:37 AM

LGTM

lib/Headers/waitpkgintrin.h
41 ↗(On Diff #141319)

Why does the intrinsic take size_t but then its truncated to 32 bits?

GBuella added inline comments.Apr 6 2018, 11:19 AM
lib/Headers/waitpkgintrin.h
41 ↗(On Diff #141319)

When I replaced umwait32 & umwait64 with a single umwait LLVM intrinsic, I choose i32 as the type of the first argument.
The doc says:
bit[0] has a meaning, while bit[31:1] are reserved.
The doc doesn't suggest that the upper 32 bits might ever be used.
But I see, this might need some more discussion.

GBuella updated this revision to Diff 142910.Apr 18 2018, 5:29 AM

Modified the intrinsic.

verena added a subscriber: verena.Apr 18 2018, 5:29 AM
verena removed a subscriber: verena.
GBuella updated this revision to Diff 142913.Apr 18 2018, 5:40 AM
craig.topper added inline comments.Apr 18 2018, 3:21 PM
lib/Headers/waitpkgintrin.h
41 ↗(On Diff #142913)

I think we should use "unsigned int" and "unsigned long long" explciitly. I think that's the prevailing behavior in the rest of our headers.

Also change the argument names to lower case. I think that's also pretty standard.

craig.topper requested changes to this revision.Apr 18 2018, 3:21 PM
This revision now requires changes to proceed.Apr 18 2018, 3:21 PM
GBuella updated this revision to Diff 143249.Apr 20 2018, 1:17 AM
GBuella retitled this revision from [X86][WAITPKG] WaitPKG intrinsics to [X86] WaitPKG intrinsics.
GBuella marked an inline comment as done.
This revision is now accepted and ready to land.Apr 20 2018, 9:51 AM
This revision was automatically updated to reflect the committed changes.