Re: [PATCH v2] arm: Don't require a runtime check function for targets with unconditional NEON

Martin Storsjö <[email protected]> Tue, 11 Oct 2022 20:04:47 +0300 (EEST)
Newsgroups gmane.comp.graphics.png.devel
Message-ID <[email protected]>
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--8323329-424641689-1665507888=:1659
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8BIT

On Tue, 11 Oct 2022, John Bowler wrote:

> This whole thread seems spurious; both PNG_ARM_NEON_CHECK and
> PNG_ARM_NEON_API have to be turned on explicitly either in pngusr.dfa or
> via arguments to the configure script (--enable-arm-neon=check or
> --enable-arm-neon=api).
> I just checked the logic; they both default to off!  Is something broken
> here?  (I don't have an ARM compiler any longer).

In the cmake build (contrary to the configure script!), 
PNG_ARM_NEON_CHECK_SUPPORTED gets defined by default when building for an 
ARM target, unless the user requested something else.

The NEON runtime check is implemented for Linux, but not for other OSes, 
hitting #error "No support for run-time ARM Neon checking; use 
compile-time options" when building for iOS and Windows on armv7.

While the user could override this when configuring the build, I though it 
could be avoided - on iOS and Windows on armv7, NEON is part of the 
platform baseline, so the compiler is free to use NEON anywhere in code 
generated from the C code, so no runtime check should be needed. The 
compiler signals this, that NEON code generation is enabled 
unconditionally, by defining __ARM_NEON__ (or __ARM_NEON).

// Martin

--8323329-424641689-1665507888=:1659
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--8323329-424641689-1665507888=:1659
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
png-mng-implement mailing list
png-mng-implement-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/png-mng-implement

--8323329-424641689-1665507888=:1659--