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