bitscan forward/reverse on Windows
John Naylor <john.naylor@enterprisedb.com>
From: John Naylor <john.naylor@enterprisedb.com>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-01-25T01:42:44Z
Lists: pgsql-hackers
Attachments
- v3-0002-Add-MSVC-support-for-bitscan-reverse-forward.patch (text/x-patch) patch v3-0002
- v3-0001-Add-asserts-to-verify-bitscan-intrinsics.patch (text/x-patch) patch v3-0001
- v3-0003-Add-new-symbols-for-reducing-repetition.patch (text/x-patch) patch v3-0003
Attached is a quick-and-dirty attempt to add MSVC support for the rightmost/leftmost-one-pos functions. 0001 adds asserts to the existing coding. 0002 adds MSVC support. Tests pass on CI, but it's of course possible that there is some bug that prevents hitting the fastpath. I've mostly used the platform specific types, so some further cleanup might be needed. 0003 tries one way to reduce the duplication that arose in 0002. Maybe there is a better way. -- John Naylor EDB: http://www.enterprisedb.com
Commits
-
Add MSVC support for pg_leftmost_one_pos32() and friends
- 67731974644c 16.0 landed
-
Add assert checking to pg_leftmost_one_pos32() and friends
- 204b0cbecb82 16.0 landed