LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 35251 - _InterlockedCompareExchange128 not implemented on Windows
Summary: _InterlockedCompareExchange128 not implemented on Windows
Status: RESOLVED FIXED
Alias: None
Product: clang
Classification: Unclassified
Component: -New Bugs (show other bugs)
Version: trunk
Hardware: PC Windows NT
: P normal
Assignee: Colden Cullen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-08 10:38 PST by Colden Cullen
Modified: 2017-12-14 11:33 PST (History)
3 users (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Colden Cullen 2017-11-08 10:38:47 PST
_InterlockedCompareExchange128 (an MSVC intrinsic) is declared on line 280 of intrin.h, but there is no implementation (that I could find), and using:
#pragma intrinsic(_InterlockedCompareExchange128)

Produces:
 error: '_InterlockedCompareExchange128' is not a recognized builtin; consider including <intrin.h> to access non-builtin intrinsics [-Werror,-Wignored-pragma-intrinsic]
                #pragma intrinsic(_InterlockedCompareExchange128)
Comment 1 Colden Cullen 2017-11-08 10:44:23 PST
I should also mention that when using the function, I get the following linker error:
f:\path\to\lld-link.exe: warning: test.o: undefined symbol: _InterlockedCompareExchange128
Comment 2 Colden Cullen 2017-11-29 15:06:35 PST
I'm working on implementing this.
Comment 3 Colden Cullen 2017-12-14 11:33:10 PST
Submitted as r320730 (http://llvm.org/viewvc/llvm-project?view=revision&revision=320730)