Re: What exactly is our CRC algorithm?
От | Heikki Linnakangas |
---|---|
Тема | Re: What exactly is our CRC algorithm? |
Дата | |
Msg-id | 551D590F.5010000@iki.fi обсуждение исходный текст |
Ответ на | Re: What exactly is our CRC algorithm? (Abhijit Menon-Sen <ams@2ndQuadrant.com>) |
Ответы |
Re: What exactly is our CRC algorithm?
|
Список | pgsql-hackers |
On 04/02/2015 12:39 PM, Abhijit Menon-Sen wrote: > At 2015-03-25 19:18:51 +0200, hlinnaka@iki.fi wrote: >> >> I think we'll need a version check there. […] >> >> You want to write that or should I? > > I'm not familiar with MSVC at all, so it would be nice if you did it. Thinking more about the configure checks, I think the current approach of using inline assembly on gcc is not quite right. We're only using inline assembly to force producing SSE 4.2 code, even when -msse4.2 is not used. That feels wrong. And who's to say that the assembler supports the SSE instructions anyway? At least we'd need a configure check for that too. We have a buildfarm animal that still uses gcc 2.95.3, which was released in 2001. I don't have a compiler of that vintage to test with, but I assume an old enough assembler would not know about the crc32q instruction and fail to compile. I believe the GCC way to do this would be to put the SSE4.2-specific code into a separate source file, and compile that file with "-msse4.2". And when you compile with -msse4.2, gcc actually also supports the _mm_crc32_u8/u64 intrinsics. - Heikki
В списке pgsql-hackers по дате отправления: