On 04/02/2015 12:39 PM, Abhijit Menon-Sen wrote:
At 2015-03-25 19:18:51 +0200, hlinn...@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



--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to