Re: What exactly is our CRC algorithm? - Mailing list pgsql-hackers

From Abhijit Menon-Sen
Subject Re: What exactly is our CRC algorithm?
Date
Msg-id 20141229131418.GA14274@toroid.org
Whole thread Raw
In response to Re: What exactly is our CRC algorithm?  (Andres Freund <andres@2ndquadrant.com>)
Responses Re: What exactly is our CRC algorithm?  (Abhijit Menon-Sen <ams@2ndQuadrant.com>)
Re: What exactly is our CRC algorithm?  (Abhijit Menon-Sen <ams@2ndQuadrant.com>)
List pgsql-hackers
At 2014-12-29 13:22:28 +0100, andres@2ndquadrant.com wrote:
>
> How about pg_choose_crc_impl() or something?

Done.

> _sb8? Unless I miss something it's not slice by 8 but rather bytewise?

This is meant to apply on top of the earlier patches I posted to
implement slice-by-8. I'll attach both here.

> Should be marked inline.

Done (and the other one too).

> > +#ifdef __GNUC__
> > +    __asm__ ("crc32b %[data], %[crc]\n" : [crc] "+r" (crc) : [data] "rm" (data));
>
> Have you checked which version of gcc introduced named references to
> input/output parameters?

No. The documentation calls them "asmSymbolicName"s, but I can't find
the term (or various likely alternatives, e.g. symbolic_operand may be
related) either in the release notes, the changelog, or the source (on
Github). Does anyone know, or know how to find out?

Meanwhile, I have attached the two patches with the other modifications.

-- Abhijit

Attachment

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: What exactly is our CRC algorithm?
Next
From: Kevin Grittner
Date:
Subject: Re: BUG #12330: ACID is broken for unique constraints