Re: [PATCH] Add native windows on arm64 support

From: Niyas Sait <niyas(dot)sait(at)linaro(dot)org>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Ian Lawrence Barwick <barwick(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Julien Rouhaud <rjuju123(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH] Add native windows on arm64 support
Date: 2022-12-01 17:17:53
Message-ID: ee92b251-da9c-2b80-c3c5-15b51cb5736a@linaro.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 05/11/2022 18:31, Andres Freund wrote:
> On 2022-11-03 11:06:46 +0000, Niyas Sait wrote:
>> I've attached a new version of the patch which excludes the already merged
>> ASLR changes and add
>> small changes to handle latest changes in the build scripts.
> Note that we're planning to remove the custom windows build scripts before the
> next release, relying on the meson build instead.
>

Thanks. I will add changes to add meson build support.

> This won't suffice with the meson build, since the relevant configure test
> also uses arm_acle.h:
> elif host_cpu == 'arm' or host_cpu == 'aarch64'
>
> prog = '''
> #include <arm_acle.h>
>
> int main(void)
> {
> unsigned int crc = 0;
> crc = __crc32cb(crc, 0);
> crc = __crc32ch(crc, 0);
> crc = __crc32cw(crc, 0);
> crc = __crc32cd(crc, 0);
>
> /* return computed value, to prevent the above being optimized away */
> return crc == 0;
> }
> '''
>
> if cc.links(prog, name: '__crc32cb, __crc32ch, __crc32cw, and __crc32cd without -march=armv8-a+crc',
> args: test_c_args)
> # Use ARM CRC Extension unconditionally
> cdata.set('USE_ARMV8_CRC32C', 1)
> have_optimized_crc = true
> elif cc.links(prog, name: '__crc32cb, __crc32ch, __crc32cw, and __crc32cd with -march=armv8-a+crc',
> args: test_c_args + ['-march=armv8-a+crc'])
> # Use ARM CRC Extension, with runtime check
> cflags_crc += '-march=armv8-a+crc'
> cdata.set('USE_ARMV8_CRC32C', false)
> cdata.set('USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK', 1)
> have_optimized_crc = true
> endif
> endif
>
> The meson checking logic is used both for msvc and other compilers, so this
> will need to work with both.

Yes, will handle that.

--
Niyas

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Niyas Sait 2022-12-01 17:20:20 Re: [PATCH] Add native windows on arm64 support
Previous Message Alexander Pyhalov 2022-12-01 16:36:12 Re: Partial aggregates pushdown