xref: /aosp_15_r20/external/libpng/contrib/powerpc-vsx/README (revision a67afe4df73cf47866eedc69947994b8ff839aba)
1*a67afe4dSAndroid Build Coastguard WorkerOPERATING SYSTEM SPECIFIC POWERPC DETECTION
2*a67afe4dSAndroid Build Coastguard Worker--------------------------------------------
3*a67afe4dSAndroid Build Coastguard Worker
4*a67afe4dSAndroid Build Coastguard WorkerDetection of the ability to execute POWERPC on processor requires
5*a67afe4dSAndroid Build Coastguard Workeroperating system support.  (The information is not available in user mode.)
6*a67afe4dSAndroid Build Coastguard Worker
7*a67afe4dSAndroid Build Coastguard WorkerCurrently only this feature is supported only for linux platform.
8*a67afe4dSAndroid Build Coastguard Worker
9*a67afe4dSAndroid Build Coastguard WorkerHOW TO USE THIS
10*a67afe4dSAndroid Build Coastguard Worker---------------
11*a67afe4dSAndroid Build Coastguard Worker
12*a67afe4dSAndroid Build Coastguard WorkerThis directory contains C code fragments that can be included in powerpc/powerpc_init.c
13*a67afe4dSAndroid Build Coastguard Workerby setting the macro PNG_POWERPC_VSX_FILE to the file name in "" or <> at build
14*a67afe4dSAndroid Build Coastguard Workertime.  This setting is not recorded in pnglibconf.h and can be changed simply by
15*a67afe4dSAndroid Build Coastguard Workerrebuilding arm/arm_init.o with the required macro definition.
16*a67afe4dSAndroid Build Coastguard Worker
17*a67afe4dSAndroid Build Coastguard WorkerFor any of this code to be used the POWERPC code must be enabled and run time
18*a67afe4dSAndroid Build Coastguard Workerchecks must be supported.  I.e.:
19*a67afe4dSAndroid Build Coastguard Worker
20*a67afe4dSAndroid Build Coastguard Worker#if PNG_POWERPC_VSX_OPT > 0
21*a67afe4dSAndroid Build Coastguard Worker#ifdef PNG_POWERPC_VSX_CHECK_SUPPORTED
22*a67afe4dSAndroid Build Coastguard Worker
23*a67afe4dSAndroid Build Coastguard WorkerThis is done in a 'configure' build by passing configure the argument:
24*a67afe4dSAndroid Build Coastguard Worker
25*a67afe4dSAndroid Build Coastguard Worker   --enable-powerpc-vsx=check
26*a67afe4dSAndroid Build Coastguard Worker
27*a67afe4dSAndroid Build Coastguard WorkerFILE FORMAT
28*a67afe4dSAndroid Build Coastguard Worker-----------
29*a67afe4dSAndroid Build Coastguard Worker
30*a67afe4dSAndroid Build Coastguard WorkerEach file documents its testing status as of the last time it was tested (which
31*a67afe4dSAndroid Build Coastguard Workermay have been a long time ago):
32*a67afe4dSAndroid Build Coastguard Worker
33*a67afe4dSAndroid Build Coastguard WorkerSTATUS: one of:
34*a67afe4dSAndroid Build Coastguard Worker   SUPPORTED: This indicates that the file is included in the regularly
35*a67afe4dSAndroid Build Coastguard Worker         performed test builds and bugs are fixed when discovered.
36*a67afe4dSAndroid Build Coastguard Worker   COMPILED: This indicates that the code did compile at least once.  See the
37*a67afe4dSAndroid Build Coastguard Worker         more detailed description for the extent to which the result was
38*a67afe4dSAndroid Build Coastguard Worker         successful.
39*a67afe4dSAndroid Build Coastguard Worker   TESTED: This means the code was fully compiled into the libpng test programs
40*a67afe4dSAndroid Build Coastguard Worker         and these were run at least once.
41*a67afe4dSAndroid Build Coastguard Worker
42*a67afe4dSAndroid Build Coastguard WorkerBUG REPORTS: an email address to which to send reports of problems
43*a67afe4dSAndroid Build Coastguard Worker
44*a67afe4dSAndroid Build Coastguard WorkerThe file is a fragment of C code. It should not define any 'extern' symbols;
45*a67afe4dSAndroid Build Coastguard Workereverything should be static.  It must define the function:
46*a67afe4dSAndroid Build Coastguard Worker
47*a67afe4dSAndroid Build Coastguard Workerstatic int png_have_vsx(png_structp png_ptr);
48*a67afe4dSAndroid Build Coastguard Worker
49*a67afe4dSAndroid Build Coastguard WorkerThat function must return 1 if POWERPC_VSX instructions are supported, 0 if not.
50*a67afe4dSAndroid Build Coastguard WorkerIt must not execute png_error unless it detects a bug.  A png_error will prevent
51*a67afe4dSAndroid Build Coastguard Workerthe reading of the PNG and in the future, writing too.
52*a67afe4dSAndroid Build Coastguard Worker
53*a67afe4dSAndroid Build Coastguard WorkerBUG REPORTS
54*a67afe4dSAndroid Build Coastguard Worker-----------
55*a67afe4dSAndroid Build Coastguard Worker
56*a67afe4dSAndroid Build Coastguard WorkerIf you mail a bug report for any file that is not SUPPORTED there may only be
57*a67afe4dSAndroid Build Coastguard Workerlimited response.  Consider fixing it and sending a patch to fix the problem -
58*a67afe4dSAndroid Build Coastguard Workerthis is more likely to result in action.
59*a67afe4dSAndroid Build Coastguard Worker
60*a67afe4dSAndroid Build Coastguard WorkerCONTRIBUTIONS
61*a67afe4dSAndroid Build Coastguard Worker-------------
62*a67afe4dSAndroid Build Coastguard Worker
63*a67afe4dSAndroid Build Coastguard WorkerYou may send contributions of new implementations to
64*a67afe4dSAndroid Build Coastguard Worker[email protected].  Please write code in strict C90 C where
65*a67afe4dSAndroid Build Coastguard Workerpossible.  Obviously OS dependencies are to be expected.  If you submit code you
66*a67afe4dSAndroid Build Coastguard Workermust have the authors permission and it must have a license that is acceptable
67*a67afe4dSAndroid Build Coastguard Workerto the current maintainer; in particular that license must permit modification
68*a67afe4dSAndroid Build Coastguard Workerand redistribution.
69*a67afe4dSAndroid Build Coastguard Worker
70*a67afe4dSAndroid Build Coastguard WorkerPlease try to make the contribution a single file and give the file a clear and
71*a67afe4dSAndroid Build Coastguard Workerunambiguous name that identifies the target OS.  If multiple files really are
72*a67afe4dSAndroid Build Coastguard Workerrequired put them all in a sub-directory.
73*a67afe4dSAndroid Build Coastguard Worker
74*a67afe4dSAndroid Build Coastguard WorkerYou must also be prepared to handle bug reports from users of the code, either
75*a67afe4dSAndroid Build Coastguard Workerby joining the png-mng-implement mailing list or by providing an email for the
76*a67afe4dSAndroid Build Coastguard Worker"BUG REPORTS" entry or both.  Please make sure that the header of the file
77*a67afe4dSAndroid Build Coastguard Workercontains the STATUS and BUG REPORTS fields as above.
78*a67afe4dSAndroid Build Coastguard Worker
79*a67afe4dSAndroid Build Coastguard WorkerPlease list the OS requirements as precisely as possible.  Ideally you should
80*a67afe4dSAndroid Build Coastguard Workeralso list the environment in which the code has been tested and certainly list
81*a67afe4dSAndroid Build Coastguard Workerany environments where you suspect it might not work.
82