Re: [PATCH] cmake: Default to PNG_ARM_NEON=off for arm targets

Martin Storsjö <[email protected]> Thu, 13 Oct 2022 15:55:12 +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-1962171779-1665665713=:1659
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8BIT

On Thu, 13 Oct 2022, Cosmin Truta wrote:

> On Wed, Oct 12, 2022 at 7:50 PM John Bowler
> <[email protected]> wrote:
>> On Wed, Oct 12, 2022 at 12:30 AM Martin Storsjö <[email protected]> wrote:
>>> This matches the configure script - unless the user has requested
>>> anything, no hardware optimizations are autoenabled.
>>
>> In the configure build the default is to determine the optimizations to use based on the compiler; this is what all the checking in pngpriv.h does and note that it only does that checking if PNG_ARM_NEON_OPT is undefined.
>
> So... wait... I was supposed to understand this, and now I realize
> that I didn't. What a mess.
>
> Let's follow through the logic of the configure script. My
> understanding is the following:
>
> Looking into "configure.ac" (and also into "configure"), if the target
> CPU (confusingly named "$host_cpu" in the autotools terminology) is
> "arm*|aarch64*", the default is to set enable_arm_neon=yes and to
> define PNG_ARM_NEON_OPT to 2. There's more to it, but this is the
> gist, basically.

AFAIK it only does this if you configure with 
--enable-hardware-optimizations - by default it doesn't.

If configure didn't set PNG_ARM_NEON_OPT, then pngpriv.h can still set it, 
if __ARM_NEON is defined.

// Martin

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


--8323329-1962171779-1665665713=: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-1962171779-1665665713=:1659--