1cb93a386Sopenharmony_ciOPERATING SYSTEM SPECIFIC POWERPC DETECTION
2cb93a386Sopenharmony_ci--------------------------------------------
3cb93a386Sopenharmony_ci
4cb93a386Sopenharmony_ciDetection of the ability to execute POWERPC on processor requires
5cb93a386Sopenharmony_cioperating system support.  (The information is not available in user mode.)
6cb93a386Sopenharmony_ci
7cb93a386Sopenharmony_ciCurrently only this feature is supported only for linux platform.
8cb93a386Sopenharmony_ci
9cb93a386Sopenharmony_ciHOW TO USE THIS
10cb93a386Sopenharmony_ci---------------
11cb93a386Sopenharmony_ci
12cb93a386Sopenharmony_ciThis directory contains C code fragments that can be included in powerpc/powerpc_init.c
13cb93a386Sopenharmony_ciby setting the macro PNG_POWERPC_VSX_FILE to the file name in "" or <> at build
14cb93a386Sopenharmony_citime.  This setting is not recorded in pnglibconf.h and can be changed simply by
15cb93a386Sopenharmony_cirebuilding arm/arm_init.o with the required macro definition.
16cb93a386Sopenharmony_ci
17cb93a386Sopenharmony_ciFor any of this code to be used the POWERPC code must be enabled and run time
18cb93a386Sopenharmony_cichecks must be supported.  I.e.:
19cb93a386Sopenharmony_ci
20cb93a386Sopenharmony_ci#if PNG_POWERPC_VSX_OPT > 0
21cb93a386Sopenharmony_ci#ifdef PNG_POWERPC_VSX_CHECK_SUPPORTED
22cb93a386Sopenharmony_ci
23cb93a386Sopenharmony_ciThis is done in a 'configure' build by passing configure the argument:
24cb93a386Sopenharmony_ci
25cb93a386Sopenharmony_ci   --enable-powerpc-vsx=check
26cb93a386Sopenharmony_ci
27cb93a386Sopenharmony_ciFILE FORMAT
28cb93a386Sopenharmony_ci-----------
29cb93a386Sopenharmony_ci
30cb93a386Sopenharmony_ciEach file documents its testing status as of the last time it was tested (which
31cb93a386Sopenharmony_cimay have been a long time ago):
32cb93a386Sopenharmony_ci
33cb93a386Sopenharmony_ciSTATUS: one of:
34cb93a386Sopenharmony_ci   SUPPORTED: This indicates that the file is included in the regularly
35cb93a386Sopenharmony_ci         performed test builds and bugs are fixed when discovered.
36cb93a386Sopenharmony_ci   COMPILED: This indicates that the code did compile at least once.  See the
37cb93a386Sopenharmony_ci         more detailed description for the extent to which the result was
38cb93a386Sopenharmony_ci         successful.
39cb93a386Sopenharmony_ci   TESTED: This means the code was fully compiled into the libpng test programs
40cb93a386Sopenharmony_ci         and these were run at least once.
41cb93a386Sopenharmony_ci
42cb93a386Sopenharmony_ciBUG REPORTS: an email address to which to send reports of problems
43cb93a386Sopenharmony_ci
44cb93a386Sopenharmony_ciThe file is a fragment of C code. It should not define any 'extern' symbols;
45cb93a386Sopenharmony_cieverything should be static.  It must define the function:
46cb93a386Sopenharmony_ci
47cb93a386Sopenharmony_cistatic int png_have_vsx(png_structp png_ptr);
48cb93a386Sopenharmony_ci
49cb93a386Sopenharmony_ciThat function must return 1 if POWERPC_VSX instructions are supported, 0 if not.
50cb93a386Sopenharmony_ciIt must not execute png_error unless it detects a bug.  A png_error will prevent
51cb93a386Sopenharmony_cithe reading of the PNG and in the future, writing too.
52cb93a386Sopenharmony_ci
53cb93a386Sopenharmony_ciBUG REPORTS
54cb93a386Sopenharmony_ci-----------
55cb93a386Sopenharmony_ci
56cb93a386Sopenharmony_ciIf you mail a bug report for any file that is not SUPPORTED there may only be
57cb93a386Sopenharmony_cilimited response.  Consider fixing it and sending a patch to fix the problem -
58cb93a386Sopenharmony_cithis is more likely to result in action.
59cb93a386Sopenharmony_ci
60cb93a386Sopenharmony_ciCONTRIBUTIONS
61cb93a386Sopenharmony_ci-------------
62cb93a386Sopenharmony_ci
63cb93a386Sopenharmony_ciYou may send contributions of new implementations to
64cb93a386Sopenharmony_cipng-mng-implement@sourceforge.net.  Please write code in strict C90 C where
65cb93a386Sopenharmony_cipossible.  Obviously OS dependencies are to be expected.  If you submit code you
66cb93a386Sopenharmony_cimust have the authors permission and it must have a license that is acceptable
67cb93a386Sopenharmony_cito the current maintainer; in particular that license must permit modification
68cb93a386Sopenharmony_ciand redistribution.
69cb93a386Sopenharmony_ci
70cb93a386Sopenharmony_ciPlease try to make the contribution a single file and give the file a clear and
71cb93a386Sopenharmony_ciunambiguous name that identifies the target OS.  If multiple files really are
72cb93a386Sopenharmony_cirequired put them all in a sub-directory.
73cb93a386Sopenharmony_ci
74cb93a386Sopenharmony_ciYou must also be prepared to handle bug reports from users of the code, either
75cb93a386Sopenharmony_ciby joining the png-mng-implement mailing list or by providing an email for the
76cb93a386Sopenharmony_ci"BUG REPORTS" entry or both.  Please make sure that the header of the file
77cb93a386Sopenharmony_cicontains the STATUS and BUG REPORTS fields as above.
78cb93a386Sopenharmony_ci
79cb93a386Sopenharmony_ciPlease list the OS requirements as precisely as possible.  Ideally you should
80cb93a386Sopenharmony_cialso list the environment in which the code has been tested and certainly list
81cb93a386Sopenharmony_ciany environments where you suspect it might not work.
82