This is an archive of the discontinued LLVM Phabricator instance.

[X86] Add MSVC-compatible intrinsics for clac, stac, lgdt and sgdt
AbandonedPublic

Authored by mkuper on Aug 24 2015, 4:56 AM.

Details

Reviewers
majnemer
rnk
Summary

LLVM part was posted as D12277

Diff Detail

Event Timeline

mkuper updated this revision to Diff 32947.Aug 24 2015, 4:56 AM
mkuper retitled this revision from to [X86] Add MSVC-compatible intrinsics for clac, stac, lgdt and sgdt.
mkuper updated this object.
mkuper added reviewers: rnk, majnemer.
mkuper added a subscriber: cfe-commits.
compnerd added inline comments.
lib/Headers/Intrin.h
961

Why does this need a builtin? Is an inline assembly block using lgdt insufficient for some reason?

965

Similar to lgdt.

mkuper added inline comments.Aug 24 2015, 11:31 PM
lib/Headers/Intrin.h
961

I think using a builtin is, generally, cleaner.
I'm ok with using inline asm (and abandoning the LLVM part of the patch), if that's the more popular option.

compnerd added inline comments.Aug 26 2015, 8:08 PM
lib/Headers/Intrin.h
961

Yes, that is the preference in my experience. Please do switch to the inline asm option.

rnk added inline comments.Aug 27 2015, 9:52 AM
lib/Headers/Intrin.h
961

I guess the distinction between these operations and others is that it isn't useful for the compiler to try to reason about these instructions, in the way that it's useful for it to reason about vector intrinsics. I'm happy with either LLVM intrinsics or inline asm.

mkuper abandoned this revision.Jun 10 2016, 4:56 PM