1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/security/nss/lib/freebl/mpi/vis_proto.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,234 @@ 1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.7 + 1.8 +/* 1.9 + * Prototypes for the inline templates in vis.il 1.10 + */ 1.11 + 1.12 +#ifndef VIS_PROTO_H 1.13 +#define VIS_PROTO_H 1.14 + 1.15 +#pragma ident "@(#)vis_proto.h 1.3 97/03/30 SMI" 1.16 + 1.17 +#ifdef __cplusplus 1.18 +extern "C" { 1.19 +#endif /* __cplusplus */ 1.20 + 1.21 +/* Pure edge handling instructions */ 1.22 +int vis_edge8(void * /*frs1*/, void * /*frs2*/); 1.23 +int vis_edge8l(void * /*frs1*/, void * /*frs2*/); 1.24 +int vis_edge16(void * /*frs1*/, void * /*frs2*/); 1.25 +int vis_edge16l(void * /*frs1*/, void * /*frs2*/); 1.26 +int vis_edge32(void * /*frs1*/, void * /*frs2*/); 1.27 +int vis_edge32l(void * /*frs1*/, void * /*frs2*/); 1.28 + 1.29 +/* Edge handling instructions with negative return values if cc set. */ 1.30 +int vis_edge8cc(void * /*frs1*/, void * /*frs2*/); 1.31 +int vis_edge8lcc(void * /*frs1*/, void * /*frs2*/); 1.32 +int vis_edge16cc(void * /*frs1*/, void * /*frs2*/); 1.33 +int vis_edge16lcc(void * /*frs1*/, void * /*frs2*/); 1.34 +int vis_edge32cc(void * /*frs1*/, void * /*frs2*/); 1.35 +int vis_edge32lcc(void * /*frs1*/, void * /*frs2*/); 1.36 + 1.37 +/* Alignment instructions. */ 1.38 +void *vis_alignaddr(void * /*rs1*/, int /*rs2*/); 1.39 +void *vis_alignaddrl(void * /*rs1*/, int /*rs2*/); 1.40 +double vis_faligndata(double /*frs1*/, double /*frs2*/); 1.41 + 1.42 +/* Partitioned comparison instructions. */ 1.43 +int vis_fcmple16(double /*frs1*/, double /*frs2*/); 1.44 +int vis_fcmpne16(double /*frs1*/, double /*frs2*/); 1.45 +int vis_fcmple32(double /*frs1*/, double /*frs2*/); 1.46 +int vis_fcmpne32(double /*frs1*/, double /*frs2*/); 1.47 +int vis_fcmpgt16(double /*frs1*/, double /*frs2*/); 1.48 +int vis_fcmpeq16(double /*frs1*/, double /*frs2*/); 1.49 +int vis_fcmpgt32(double /*frs1*/, double /*frs2*/); 1.50 +int vis_fcmpeq32(double /*frs1*/, double /*frs2*/); 1.51 + 1.52 +/* Partitioned multiplication. */ 1.53 +#if 0 1.54 +double vis_fmul8x16(float /*frs1*/, double /*frs2*/); 1.55 +#endif 1.56 +double vis_fmul8x16_dummy(float /*frs1*/, int /*dummy*/, double /*frs2*/); 1.57 +double vis_fmul8x16au(float /*frs1*/, float /*frs2*/); 1.58 +double vis_fmul8x16al(float /*frs1*/, float /*frs2*/); 1.59 +double vis_fmul8sux16(double /*frs1*/, double /*frs2*/); 1.60 +double vis_fmul8ulx16(double /*frs1*/, double /*frs2*/); 1.61 +double vis_fmuld8ulx16(float /*frs1*/, float /*frs2*/); 1.62 +double vis_fmuld8sux16(float /*frs1*/, float /*frs2*/); 1.63 + 1.64 +/* Partitioned addition & subtraction. */ 1.65 +double vis_fpadd16(double /*frs1*/, double /*frs2*/); 1.66 +float vis_fpadd16s(float /*frs1*/, float /*frs2*/); 1.67 +double vis_fpadd32(double /*frs1*/, double /*frs2*/); 1.68 +float vis_fpadd32s(float /*frs1*/, float /*frs2*/); 1.69 +double vis_fpsub16(double /*frs1*/, double /*frs2*/); 1.70 +float vis_fpsub16s(float /*frs1*/, float /*frs2*/); 1.71 +double vis_fpsub32(double /*frs1*/, double /*frs2*/); 1.72 +float vis_fpsub32s(float /*frs1*/, float /*frs2*/); 1.73 + 1.74 +/* Pixel packing & clamping. */ 1.75 +float vis_fpack16(double /*frs2*/); 1.76 +double vis_fpack32(double /*frs1*/, double /*frs2*/); 1.77 +float vis_fpackfix(double /*frs2*/); 1.78 + 1.79 +/* Combined pack ops. */ 1.80 +double vis_fpack16_pair(double /*frs2*/, double /*frs2*/); 1.81 +double vis_fpackfix_pair(double /*frs2*/, double /*frs2*/); 1.82 +void vis_st2_fpack16(double, double, double *); 1.83 +void vis_std_fpack16(double, double, double *); 1.84 +void vis_st2_fpackfix(double, double, double *); 1.85 + 1.86 +double vis_fpack16_to_hi(double /*frs1*/, double /*frs2*/); 1.87 +double vis_fpack16_to_lo(double /*frs1*/, double /*frs2*/); 1.88 + 1.89 +/* Motion estimation. */ 1.90 +double vis_pdist(double /*frs1*/, double /*frs2*/, double /*frd*/); 1.91 + 1.92 +/* Channel merging. */ 1.93 +double vis_fpmerge(float /*frs1*/, float /*frs2*/); 1.94 + 1.95 +/* Pixel expansion. */ 1.96 +double vis_fexpand(float /*frs2*/); 1.97 +double vis_fexpand_hi(double /*frs2*/); 1.98 +double vis_fexpand_lo(double /*frs2*/); 1.99 + 1.100 +/* Bitwise logical operators. */ 1.101 +double vis_fnor(double /*frs1*/, double /*frs2*/); 1.102 +float vis_fnors(float /*frs1*/, float /*frs2*/); 1.103 +double vis_fandnot(double /*frs1*/, double /*frs2*/); 1.104 +float vis_fandnots(float /*frs1*/, float /*frs2*/); 1.105 +double vis_fnot(double /*frs1*/); 1.106 +float vis_fnots(float /*frs1*/); 1.107 +double vis_fxor(double /*frs1*/, double /*frs2*/); 1.108 +float vis_fxors(float /*frs1*/, float /*frs2*/); 1.109 +double vis_fnand(double /*frs1*/, double /*frs2*/); 1.110 +float vis_fnands(float /*frs1*/, float /*frs2*/); 1.111 +double vis_fand(double /*frs1*/, double /*frs2*/); 1.112 +float vis_fands(float /*frs1*/, float /*frs2*/); 1.113 +double vis_fxnor(double /*frs1*/, double /*frs2*/); 1.114 +float vis_fxnors(float /*frs1*/, float /*frs2*/); 1.115 +double vis_fsrc(double /*frs1*/); 1.116 +float vis_fsrcs(float /*frs1*/); 1.117 +double vis_fornot(double /*frs1*/, double /*frs2*/); 1.118 +float vis_fornots(float /*frs1*/, float /*frs2*/); 1.119 +double vis_for(double /*frs1*/, double /*frs2*/); 1.120 +float vis_fors(float /*frs1*/, float /*frs2*/); 1.121 +double vis_fzero(void); 1.122 +float vis_fzeros(void); 1.123 +double vis_fone(void); 1.124 +float vis_fones(void); 1.125 + 1.126 +/* Partial stores. */ 1.127 +void vis_stdfa_ASI_PST8P(double /*frd*/, void * /*rs1*/, int /*rmask*/); 1.128 +void vis_stdfa_ASI_PST8PL(double /*frd*/, void * /*rs1*/, int /*rmask*/); 1.129 +void vis_stdfa_ASI_PST8P_int_pair(void * /*rs1*/, void * /*rs2*/, 1.130 + void * /*rs3*/, int /*rmask*/); 1.131 +void vis_stdfa_ASI_PST8S(double /*frd*/, void * /*rs1*/, int /*rmask*/); 1.132 +void vis_stdfa_ASI_PST16P(double /*frd*/, void * /*rs1*/, int /*rmask*/); 1.133 +void vis_stdfa_ASI_PST16S(double /*frd*/, void * /*rs1*/, int /*rmask*/); 1.134 +void vis_stdfa_ASI_PST32P(double /*frd*/, void * /*rs1*/, int /*rmask*/); 1.135 +void vis_stdfa_ASI_PST32S(double /*frd*/, void * /*rs1*/, int /*rmask*/); 1.136 + 1.137 +/* Byte & short stores. */ 1.138 +void vis_stdfa_ASI_FL8P(double /*frd*/, void * /*rs1*/); 1.139 +void vis_stdfa_ASI_FL8P_index(double /*frd*/, void * /*rs1*/, long /*index*/); 1.140 +void vis_stdfa_ASI_FL8S(double /*frd*/, void * /*rs1*/); 1.141 +void vis_stdfa_ASI_FL16P(double /*frd*/, void * /*rs1*/); 1.142 +void vis_stdfa_ASI_FL16P_index(double /*frd*/, void * /*rs1*/, long /*index*/); 1.143 +void vis_stdfa_ASI_FL16S(double /*frd*/, void * /*rs1*/); 1.144 +void vis_stdfa_ASI_FL8PL(double /*frd*/, void * /*rs1*/); 1.145 +void vis_stdfa_ASI_FL8SL(double /*frd*/, void * /*rs1*/); 1.146 +void vis_stdfa_ASI_FL16PL(double /*frd*/, void * /*rs1*/); 1.147 +void vis_stdfa_ASI_FL16SL(double /*frd*/, void * /*rs1*/); 1.148 + 1.149 +/* Byte & short loads. */ 1.150 +double vis_lddfa_ASI_FL8P(void * /*rs1*/); 1.151 +double vis_lddfa_ASI_FL8P_index(void * /*rs1*/, long /*index*/); 1.152 +double vis_lddfa_ASI_FL8P_hi(void * /*rs1*/, unsigned int /*index*/); 1.153 +double vis_lddfa_ASI_FL8P_lo(void * /*rs1*/, unsigned int /*index*/); 1.154 +double vis_lddfa_ASI_FL8S(void * /*rs1*/); 1.155 +double vis_lddfa_ASI_FL16P(void * /*rs1*/); 1.156 +double vis_lddfa_ASI_FL16P_index(void * /*rs1*/, long /*index*/); 1.157 +double vis_lddfa_ASI_FL16S(void * /*rs1*/); 1.158 +double vis_lddfa_ASI_FL8PL(void * /*rs1*/); 1.159 +double vis_lddfa_ASI_FL8SL(void * /*rs1*/); 1.160 +double vis_lddfa_ASI_FL16PL(void * /*rs1*/); 1.161 +double vis_lddfa_ASI_FL16SL(void * /*rs1*/); 1.162 + 1.163 +/* Direct write to GSR, read from GSR */ 1.164 +void vis_write_gsr(unsigned int /*GSR*/); 1.165 +unsigned int vis_read_gsr(void); 1.166 + 1.167 +/* Voxel texture mapping. */ 1.168 +#if !defined(_NO_LONGLONG) 1.169 +unsigned long vis_array8(unsigned long long /*rs1*/, int /*rs2*/); 1.170 +unsigned long vis_array16(unsigned long long /*rs1*/, int /*rs2*/); 1.171 +unsigned long vis_array32(unsigned long long /*rs1*/, int /*rs2*/); 1.172 +#endif /* !defined(_NO_LONGLONG) */ 1.173 + 1.174 +/* Register aliasing and type casts. */ 1.175 +float vis_read_hi(double /*frs1*/); 1.176 +float vis_read_lo(double /*frs1*/); 1.177 +double vis_write_hi(double /*frs1*/, float /*frs2*/); 1.178 +double vis_write_lo(double /*frs1*/, float /*frs2*/); 1.179 +double vis_freg_pair(float /*frs1*/, float /*frs2*/); 1.180 +float vis_to_float(unsigned int /*value*/); 1.181 +double vis_to_double(unsigned int /*value1*/, unsigned int /*value2*/); 1.182 +double vis_to_double_dup(unsigned int /*value*/); 1.183 +#if !defined(_NO_LONGLONG) 1.184 +double vis_ll_to_double(unsigned long long /*value*/); 1.185 +#endif /* !defined(_NO_LONGLONG) */ 1.186 + 1.187 +/* Miscellany (no inlines) */ 1.188 +void vis_error(char * /*fmt*/, int /*a0*/); 1.189 +void vis_sim_init(void); 1.190 + 1.191 +/* For better performance */ 1.192 +#define vis_fmul8x16(farg,darg) vis_fmul8x16_dummy((farg),0,(darg)) 1.193 + 1.194 +/* Nicknames for explicit ASI loads and stores. */ 1.195 +#define vis_st_u8 vis_stdfa_ASI_FL8P 1.196 +#define vis_st_u8_i vis_stdfa_ASI_FL8P_index 1.197 +#define vis_st_u8_le vis_stdfa_ASI_FL8PL 1.198 +#define vis_st_u16 vis_stdfa_ASI_FL16P 1.199 +#define vis_st_u16_i vis_stdfa_ASI_FL16P_index 1.200 +#define vis_st_u16_le vis_stdfa_ASI_FL16PL 1.201 + 1.202 +#define vis_ld_u8 vis_lddfa_ASI_FL8P 1.203 +#define vis_ld_u8_i vis_lddfa_ASI_FL8P_index 1.204 +#define vis_ld_u8_le vis_lddfa_ASI_FL8PL 1.205 +#define vis_ld_u16 vis_lddfa_ASI_FL16P 1.206 +#define vis_ld_u16_i vis_lddfa_ASI_FL16P_index 1.207 +#define vis_ld_u16_le vis_lddfa_ASI_FL16PL 1.208 + 1.209 +#define vis_pst_8 vis_stdfa_ASI_PST8P 1.210 +#define vis_pst_16 vis_stdfa_ASI_PST16P 1.211 +#define vis_pst_32 vis_stdfa_ASI_PST32P 1.212 + 1.213 +#define vis_st_u8s vis_stdfa_ASI_FL8S 1.214 +#define vis_st_u8s_le vis_stdfa_ASI_FL8SL 1.215 +#define vis_st_u16s vis_stdfa_ASI_FL16S 1.216 +#define vis_st_u16s_le vis_stdfa_ASI_FL16SL 1.217 + 1.218 +#define vis_ld_u8s vis_lddfa_ASI_FL8S 1.219 +#define vis_ld_u8s_le vis_lddfa_ASI_FL8SL 1.220 +#define vis_ld_u16s vis_lddfa_ASI_FL16S 1.221 +#define vis_ld_u16s_le vis_lddfa_ASI_FL16SL 1.222 + 1.223 +#define vis_pst_8s vis_stdfa_ASI_PST8S 1.224 +#define vis_pst_16s vis_stdfa_ASI_PST16S 1.225 +#define vis_pst_32s vis_stdfa_ASI_PST32S 1.226 + 1.227 +/* "<" and ">=" may be implemented in terms of ">" and "<=". */ 1.228 +#define vis_fcmplt16(a,b) vis_fcmpgt16((b),(a)) 1.229 +#define vis_fcmplt32(a,b) vis_fcmpgt32((b),(a)) 1.230 +#define vis_fcmpge16(a,b) vis_fcmple16((b),(a)) 1.231 +#define vis_fcmpge32(a,b) vis_fcmple32((b),(a)) 1.232 + 1.233 +#ifdef __cplusplus 1.234 +} // End of extern "C" 1.235 +#endif /* __cplusplus */ 1.236 + 1.237 +#endif /* VIS_PROTO_H */