-
Notifications
You must be signed in to change notification settings - Fork 624
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This change updates support for target-specific code. #615
This change updates support for target-specific code. #615
Conversation
As best I understand them this PR incorporates all your required changes. It doesn't change the actual code, just the comments, commit messages and so on. |
In fact this is incomplete; the Loongson support isn't there and I can't do that. It needs a non-US person. |
426ec97
to
4793eca
Compare
The change removes the need for build configuration of target specific code such as SIMD enhancements. The extensible framework is based on checks in the new file named pngtarget.h and allows per target description of requirements and capabilities using macros with the prefix PNG_TARGET_. These macros are interpreted by the core libpng code in a target independent way. The PNG_TARGET_ prefixed macros describe the target specific implementation and document how to include it. The actual inclusion of the code is done, at present, by a single target independent core file named pngsimd.c. This approach ensures that no special configuration in the build system is required on any system. It is not required on a system which is compiling for the build host where we can reasonably assume that the compiler is correctly set up. Neither is it required for cross builds so long as the toolchain is correctly set up. In this case the toolchain means the cross build system and any ancilliary programs it requires. More details of the implementation are included in the source files named pngtarget.h and pngsimd.c. These files document in C comments how additional target specific code might be added. The changes consist primarily of movement of target specific code from the core libpng source files to the existing target specific subdirectories such as the ones named intel and arm. This isolates the code into the corresponding subdirectory and eliminates the requirement for changes across the libpng structure. As part of this the ARM processor NEON instruction set specific palette to RGB code has been generalised to allow implementation in other architectures. The resultant updated version of the original (ARM Ltd) implementation has been moved to the subdirectory named arm. In addition some selected changes have been included to allow testing with higher warning levels than the typical compiler defaults. Signed-off-by: John Bowler <[email protected]>
4793eca
to
b1626b7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Big honking commit approved 👍
The change removes the need for build configuration of target specific
code such as SIMD enhancements.
The extensible framework is based on checks in the new file named
pngtarget.h and allows per target description of requirements and
capabilities using macros with the prefix PNG_TARGET_. These macros are
interpreted by the core libpng code in a target independent way.
The PNG_TARGET_ prefixed macros describe the target specific
implementation and document how to include it. The actual inclusion of
the code is done, at present, by a single target independent core file
named pngsimd.c.
This approach ensures that no special configuration in the build system
is required on any system. It is not required on a system which is
compiling for the build host where we can reasonably assume that the
compiler is correctly set up. Neither is it required for cross builds
so long as the toolchain is correctly set up. In this case the
toolchain means the cross build system and any ancilliary programs it
requires.
More details of the implementation are included in the source files
named pngtarget.h and pngsimd.c. These files document in C comments how
additional target specific code might be added.
The changes consist primarily of movement of target specific code from
the core libpng source files to the existing target specific
subdirectories such as the ones named intel and arm. This isolates the
code into the corresponding subdirectory and eliminates the requirement
for changes across the libpng structure.
As part of this the ARM processor NEON instruction set specific palette
to RGB code has been generalised to allow implementation in other
architectures. The resultant updated version of the original (ARM Ltd)
implementation has been moved to the subdirectory named arm.
In addition some selected changes have been included to allow testing
with higher warning levels than the typical compiler defaults.
Signed-off-by: John Bowler [email protected]