mpopt.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2003 Bob Deblier
00003  *
00004  * This library is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU Lesser General Public
00006  * License as published by the Free Software Foundation; either
00007  * version 2.1 of the License, or (at your option) any later version.
00008  *
00009  * This library is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  * Lesser General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU Lesser General Public
00015  * License along with this library; if not, write to the Free Software
00016  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00017  *
00018  */
00019 
00026 #ifndef _MPOPT_H
00027 #define _MPOPT_H
00028 
00029 #if WIN32
00030 # if __MWERKS__ && __INTEL__
00031 # elif defined(_MSC_VER) && defined(_M_IX86)
00032 #  define ASM_MPZERO
00033 #  define ASM_MPFILL
00034 #  define ASM_MPEVEN
00035 #  define ASM_MPODD
00036 #  define ASM_MPADDW
00037 #  define ASM_MPSUBW
00038 #  define ASM_MPADD
00039 #  define ASM_MPSUB
00040 #  define ASM_MPMULTWO
00041 #  define ASM_MPDIVTWO
00042 #  define ASM_MPSETMUL
00043 #  define ASM_MPADDMUL
00044 #  define ASM_MPADDSQRTRC
00045 # endif
00046 #endif
00047 
00048 #if defined(__DECC)
00049 # if defined(OPTIMIZE_ALPHA)
00050 #  define ASM_MPADD
00051 #  define ASM_MPSUB
00052 #  define ASM_MPSETMUL
00053 #  define ASM_MPADDMUL
00054 #  define ASM_MPADDSQRTRC
00055 # endif
00056 #endif
00057 
00058 #if defined(__GNUC__)
00059 # if defined(OPTIMIZE_ALPHA)
00060 #  define ASM_MPADD
00061 #  define ASM_MPSUB
00062 #  define ASM_MPSETMUL
00063 #  define ASM_MPADDMUL
00064 #  define ASM_MPADDSQRTRC
00065 # elif defined(OPTIMIZE_ARM)
00066 #  define ASM_MPSETMUL
00067 #  define ASM_MPADDMUL
00068 #  define ASM_MPADDSQRTRC
00069 # elif defined(OPTIMIZE_I386) || defined(OPTIMIZE_I486) || defined(OPTIMIZE_I586) || defined(OPTIMIZE_I686)
00070 #  define ASM_MPZERO
00071 #  define ASM_MPFILL
00072 #  define ASM_MPEVEN
00073 #  define ASM_MPODD
00074 #  define ASM_MPADD
00075 #  define ASM_MPADDW
00076 #  define ASM_MPSUB
00077 #  define ASM_MPSUBW
00078 #  define ASM_MPMULTWO
00079 #  define ASM_MPDIVTWO
00080 #  define ASM_MPSETMUL
00081 #  define ASM_MPADDMUL
00082 #  define ASM_MPADDSQRTRC
00083 #  define ASM_MPPNDIV
00084 # elif defined(OPTIMIZE_IA64)
00085 #  define ASM_MPZERO
00086 #  define ASM_MPCOPY
00087 #  define ASM_MPADD
00088 #  define ASM_MPSUB
00089 #  define ASM_MPMULTWO
00090 #  define ASM_MPSETMUL
00091 #  define ASM_MPADDMUL
00092 # elif defined(OPTIMIZE_M68K)
00093 #  define ASM_MPADD
00094 #  define ASM_MPSUB
00095 #  define ASM_MPSETMUL
00096 #  define ASM_MPADDMUL
00097 #  define ASM_MPADDSQRTRC
00098 # elif defined(OPTIMIZE_POWERPC) || defined(OPTIMIZE_POWERPC64)
00099 #  define ASM_MPSETMUL
00100 #  define ASM_MPADD
00101 #  define ASM_MPADDW
00102 #  define ASM_MPSUB
00103 #  define ASM_MPSUBW
00104 #  define ASM_MPMULTWO
00105 #  define ASM_MPADDMUL
00106 #  define ASM_MPADDSQRTRC
00107 # elif defined(OPTIMIZE_S390X)
00108 #  define ASM_MPSETMUL
00109 #  define ASM_MPADDMUL
00110 #  define ASM_MPADDSQRTRC
00111 # elif defined(OPTIMIZE_SPARCV8)
00112 #  define ASM_MPSETMUL
00113 #  define ASM_MPADDMUL
00114 #  define ASM_MPADDSQRTRC
00115 # elif defined(OPTIMIZE_SPARCV8PLUS)
00116 #  define ASM_MPADDW
00117 #  define ASM_MPSUBW
00118 #  define ASM_MPADD
00119 #  define ASM_MPSUB
00120 #  define ASM_MPMULTWO
00121 #  define ASM_MPSETMUL
00122 #  define ASM_MPADDMUL
00123 #  define ASM_MPADDSQRTRC
00124 # elif defined(OPTIMIZE_X86_64)
00125 #  define ASM_MPZERO
00126 #  define ASM_MPFILL
00127 #  define ASM_MPEVEN
00128 #  define ASM_MPODD
00129 #  define ASM_MPADD
00130 #  define ASM_MPADDW
00131 #  define ASM_MPSUB
00132 #  define ASM_MPSUBW
00133 #  define ASM_MPDIVTWO
00134 #  define ASM_MPMULTWO
00135 #  define ASM_MPSETMUL
00136 #  define ASM_MPADDMUL
00137 #  define ASM_MPADDSQRTRC
00138 # endif
00139 #endif
00140 
00141 #if defined(__IBMC__)
00142 # if defined(OPTIMIZE_POWERPC) || defined(OPTIMIZE_POWERPC64)
00143 #  define ASM_MPSETMUL
00144 #  define ASM_MPADDW
00145 #  define ASM_MPSUBW
00146 #  define ASM_MPADD
00147 #  define ASM_MPSUB
00148 #  define ASM_MPMULTWO
00149 #  define ASM_MPADDMUL
00150 #  define ASM_MPADDSQRTRC
00151 # endif
00152 #endif
00153 
00154 #if defined(__INTEL_COMPILER)
00155 # if defined(OPTIMIZE_I386) || defined(OPTIMIZE_I486) || defined(OPTIMIZE_I586) || defined(OPTIMIZE_I686)
00156 #  define ASM_MPZERO
00157 #  define ASM_MPFILL
00158 #  define ASM_MPEVEN
00159 #  define ASM_MPODD
00160 #  define ASM_MPADDW
00161 #  define ASM_MPSUBW
00162 #  define ASM_MPADD
00163 #  define ASM_MPSUB
00164 #  define ASM_MPMULTWO
00165 #  define ASM_MPDIVTWO
00166 #  define ASM_MPSETMUL
00167 #  define ASM_MPADDMUL
00168 #  define ASM_MPADDSQRTRC
00169 #  define ASM_MPPNDIV
00170 # endif
00171 #endif
00172 
00173 #if defined(__SUNPRO_C) || defined(__SUNPRO_CC)
00174 # if defined(OPTIMIZE_SPARCV8)
00175 #  define ASM_MPSETMUL
00176 #  define ASM_MPADDMUL
00177 #  define ASM_MPADDSQRTRC
00178 # elif defined(OPTIMIZE_SPARCV8PLUS)
00179 #  define ASM_MPADDW
00180 #  define ASM_MPSUBW
00181 #  define ASM_MPADD
00182 #  define ASM_MPSUB
00183 #  define ASM_MPMULTWO
00184 #  define ASM_MPSETMUL
00185 #  define ASM_MPADDMUL
00186 #  define ASM_MPADDSQRTRC
00187 # endif
00188 #endif
00189 
00190 #endif

Generated on Sat Jan 19 01:53:19 2008 for BeeCrypt by  doxygen 1.5.4