This is an archive of the discontinued LLVM Phabricator instance.

[COFF] Add more missing MSVC ARM64 intrinsics
ClosedPublic

Authored by mgrang on Jul 17 2018, 12:12 PM.

Details

Summary

Added the following intrinsics:
_BitScanForward, _BitScanReverse, _BitScanForward64, _BitScanReverse64
_InterlockedAnd64, _InterlockedDecrement64, _InterlockedExchange64,
_InterlockedExchangeAdd64, _InterlockedExchangeSub64,
_InterlockedIncrement64, _InterlockedOr64, _InterlockedXor64.

Diff Detail

Repository
rL LLVM

Event Timeline

mgrang created this revision.Jul 17 2018, 12:12 PM
mstorsjo accepted this revision.Jul 17 2018, 12:57 PM

LGTM except for the minor comment

lib/Headers/intrin.h
302 ↗(On Diff #155945)

This ifdef feels a bit inconsistent; when the other existing ones are in the form __x86_64__ and __arm__ (and not _M_X64 or _M_ARM), the last one should probably be __aarch64__ as well. Both here and in the testcase.

This revision is now accepted and ready to land.Jul 17 2018, 12:57 PM
mgrang updated this revision to Diff 155951.EditedJul 17 2018, 1:07 PM

Thanks @mstorsjo. Changed _M_ARM64 checks to aarch64 checks.

This revision was automatically updated to reflect the committed changes.