Re: [PATCH] arm: Don't require a runtime check function for targets with unconditional NEON
John Bowler <[email protected]> Tue, 11 Oct 2022 08:48:47 -0700
| Newsgroups | gmane.comp.graphics.png.devel |
|---|---|
| Message-ID | <CAP7U39_U3L9a606fgyog020aArAMq5S-XuUMy+VVw65QpOUH4w@mail.gmail.com> |
Hardware checks like this cannot be done at configuration time; they either have to be done at run time or compile time. This is because of the way cellphone OSes handle the requirement to ship single apps for multiple architectures. IRC the Google implementation uses run time checks and the Apple implementation uses compile time checks via multilib. In neither of these cases can the architecture be set in configure because there are multiple architectures in one build. In the runtime case explicit code in the binary swaps to the relevant implementation, in the multilib case the configuration is compiled with multiple passes of the compiler one for each distinct architecture then combined at the link step via, I assume, trampolines to the correct implementation (so that can be done as a loader operation, just like DLL handling). So the configuration can be used to switch hardware specific code *off *and can even, perhaps for testing, be used to hard-switch it on but the normal case is to let the build system determine the right code via compiler set #defines. Doing "configure" tests just doesn't work; it freezes the result to early. I thought I had fixed this, but that was years ago. It is perhaps best placed in an architecture specific header file rather than cluttering up pngpriv.h; nothing outside architecture specific code should ever depend on it. It strikes me as unfortunate and a mistake that #defiens exist in png.h for architecture specific stuff; this should not be part of the public API. _______________________________________________ png-mng-implement mailing list png-mng-implement-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/png-mng-implement