Re: Using POPCNT and other advanced bit manipulation instructions - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Using POPCNT and other advanced bit manipulation instructions
Date
Msg-id 986.1550243138@sss.pgh.pa.us
Whole thread Raw
In response to Re: Using POPCNT and other advanced bit manipulation instructions  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: Using POPCNT and other advanced bit manipulation instructions  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> Ah, I understand it now:
> https://stackoverflow.com/questions/25683690/confusion-about-bsr-and-lzcnt/43443701#43443701
> if you call LZCNT/TZCNT on a CPU that doesn't support it, it won't raise
> SIGILL or anything ... it'll just silently compute the wrong result.
> That's certainly not what I call a fallback!

Yeah, that's pretty nasty; it means there's no backstop for whether
your choose function gets it right :-(

Is POPCNT any better in this respect?

            regards, tom lane


pgsql-hackers by date:

Previous
From: Christoph Berg
Date:
Subject: Re: [HACKERS] Time to change pg_regress diffs to unified by default?
Next
From: Tomas Vondra
Date:
Subject: Re: libpq compression