Re: [PATCH] Add native windows on arm64 support - Mailing list pgsql-hackers

From Niyas Sait
Subject Re: [PATCH] Add native windows on arm64 support
Date
Msg-id a5831ccc-6bce-feba-6910-338dabf85be1@linaro.org
Whole thread Raw
In response to Re: [PATCH] Add native windows on arm64 support  (John Naylor <john.naylor@enterprisedb.com>)
List pgsql-hackers
On 02/12/2022 05:41, John Naylor wrote:
>> I couldn't find something more official for the sse2neon library part.
> Not quite sure what this is referring to, but it seems we can just point to
> the __aarch64__ section in the same file, which uses the same instruction:
> 
> spin_delay(void)
> {
>    __asm__ __volatile__(
>    " isb; \n");
> }
> 
> ...and which already explains the choice with a comment.

Good point. Will add the comment.

> +  if cc.get_id() == 'msvc'
> +    cdata.set('USE_ARMV8_CRC32C', false)
> +    cdata.set('USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK', 1)
> +    have_optimized_crc = true
> +  else
> 
> That seems like a heavy-handed way to force it. Could we just use the same
> gating in the test program that the patch puts in the code of interest?
> Namely:
> 
> +#ifndef _MSC_VER
>  #include <arm_acle.h>
> +#endif
I took a similar approach as x86 MSVC code. I don't think the test 
program would work with MSVC. The compiler options are not MSVC friendly.

-- 
Niyas



pgsql-hackers by date:

Previous
From: Niyas Sait
Date:
Subject: Re: [PATCH] Add native windows on arm64 support
Next
From: Amit Kapila
Date:
Subject: Re: Perform streaming logical transactions by background workers and parallel apply