This is an archive of the discontinued LLVM Phabricator instance.

[COFF, ARM64] Declare intrinsics: __nop, _byteswap_[ushort/ulong/uint64]
AbandonedPublic

Authored by mgrang on Jan 11 2019, 4:03 PM.

Details

Summary

Declare the intrinsics: _byteswap_ushort, _byteswap_long, _byteswap_uint64, __nop

Diff Detail

Event Timeline

mgrang created this revision.Jan 11 2019, 4:03 PM

Have you verified this matches MSVC? (IIRC the only reason we include stdlib.h on x86 is so we can define _mm_malloc.)

Have you verified this matches MSVC? (IIRC the only reason we include stdlib.h on x86 is so we can define _mm_malloc.)

I don't see MSVC intrin.h including stdlib.h. So I guess I will just declare the required intrinsics.

mgrang updated this revision to Diff 181390.Jan 11 2019, 4:26 PM
mgrang retitled this revision from [COFF, ARM64] Include stdlib.h in arm64intr.h to [COFF, ARM64] Declare intrinsics: __nop, _byteswap_[short/long/uint64].
mgrang edited the summary of this revision. (Show Details)
mgrang retitled this revision from [COFF, ARM64] Declare intrinsics: __nop, _byteswap_[short/long/uint64] to [COFF, ARM64] Declare intrinsics: __nop, _byteswap_[ushort/ulong/uint64].
efriedma added inline comments.Jan 11 2019, 4:56 PM
lib/Headers/intrin.h
569

Isn't there already a declaration of __nop in intrin.h? (Line 100.)

We need full definition for __nop in intrin.h.

lib/Headers/intrin.h
569

For nop, we probably need full definition instead of declaration, just like nop for x86/x64 in this file.

mgrang added a comment.EditedJan 14 2019, 10:09 AM

I have implemented __nop intrinsic in D56671

mgrang abandoned this revision.Jan 14 2019, 3:28 PM

_bytswap intrinsics are added in D56685. Abandoning this patch.