Bug 258557 - __builtin_popcount and __builtin_popcountll are not defined by MSVC
Summary: __builtin_popcount and __builtin_popcountll are not defined by MSVC
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Hayashida Ryuichi
URL:
Keywords: InRadar
Depends on:
Blocks: 222315
  Show dependency treegraph
 
Reported: 2023-06-27 03:32 PDT by Hayashida Ryuichi
Modified: 2023-06-30 06:50 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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>