Bug 258557

Summary: __builtin_popcount and __builtin_popcountll are not defined by MSVC
Product: WebKit Reporter: Hayashida Ryuichi <Ryuichi.Hayashida>
Component: JavaScriptCoreAssignee: Hayashida Ryuichi <Ryuichi.Hayashida>
Status: RESOLVED FIXED    
Severity: Normal CC: Hironori.Fujii, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 222315    

Description Hayashida Ryuichi 2023-06-27 03:32:20 PDT
__builtin_popcount and __builtin_popcountll are builtin functions provided by Clang and GCC, but MSVC doesn't provide the same function. Instead, __popcnt and __popcnt64 should be used when building WebKit for Windows.

https://learn.microsoft.com/en-us/cpp/intrinsics/popcnt16-popcnt-popcnt64?view=msvc-170
Comment 1 Hayashida Ryuichi 2023-06-30 02:32:24 PDT
Pull request: https://github.com/WebKit/WebKit/pull/15439
Comment 2 EWS 2023-06-30 06:49:27 PDT
Committed 265651@main (4e7fe413ab40): <https://commits.webkit.org/265651@main>

Reviewed commits have been landed. Closing PR #15439 and removing active labels.
Comment 3 Radar WebKit Bug Importer 2023-06-30 06:50:17 PDT
<rdar://problem/111567094>