security/nss/lib/freebl/mpi/vis_proto.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 /* This Source Code Form is subject to the terms of the Mozilla Public
     2  * License, v. 2.0. If a copy of the MPL was not distributed with this
     3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     5 /*
     6  * Prototypes for the inline templates in vis.il
     7  */
     9 #ifndef VIS_PROTO_H
    10 #define VIS_PROTO_H
    12 #pragma ident	"@(#)vis_proto.h	1.3	97/03/30 SMI"
    14 #ifdef __cplusplus
    15 extern "C" {
    16 #endif /* __cplusplus */
    18 /* Pure edge handling instructions */
    19 int vis_edge8(void * /*frs1*/, void * /*frs2*/);
    20 int vis_edge8l(void * /*frs1*/, void * /*frs2*/);
    21 int vis_edge16(void * /*frs1*/, void * /*frs2*/);
    22 int vis_edge16l(void * /*frs1*/, void * /*frs2*/);
    23 int vis_edge32(void * /*frs1*/, void * /*frs2*/);
    24 int vis_edge32l(void * /*frs1*/, void * /*frs2*/);
    26 /* Edge handling instructions with negative return values if cc set. */
    27 int vis_edge8cc(void * /*frs1*/, void * /*frs2*/);
    28 int vis_edge8lcc(void * /*frs1*/, void * /*frs2*/);
    29 int vis_edge16cc(void * /*frs1*/, void * /*frs2*/);
    30 int vis_edge16lcc(void * /*frs1*/, void * /*frs2*/);
    31 int vis_edge32cc(void * /*frs1*/, void * /*frs2*/);
    32 int vis_edge32lcc(void * /*frs1*/, void * /*frs2*/);
    34 /* Alignment instructions. */
    35 void *vis_alignaddr(void * /*rs1*/, int /*rs2*/);
    36 void *vis_alignaddrl(void * /*rs1*/, int /*rs2*/);
    37 double vis_faligndata(double /*frs1*/, double /*frs2*/);
    39 /* Partitioned comparison instructions. */
    40 int vis_fcmple16(double /*frs1*/, double /*frs2*/);
    41 int vis_fcmpne16(double /*frs1*/, double /*frs2*/);
    42 int vis_fcmple32(double /*frs1*/, double /*frs2*/);
    43 int vis_fcmpne32(double /*frs1*/, double /*frs2*/);
    44 int vis_fcmpgt16(double /*frs1*/, double /*frs2*/);
    45 int vis_fcmpeq16(double /*frs1*/, double /*frs2*/);
    46 int vis_fcmpgt32(double /*frs1*/, double /*frs2*/);
    47 int vis_fcmpeq32(double /*frs1*/, double /*frs2*/);
    49 /* Partitioned multiplication. */
    50 #if 0
    51 double vis_fmul8x16(float /*frs1*/, double /*frs2*/);
    52 #endif
    53 double vis_fmul8x16_dummy(float /*frs1*/, int /*dummy*/, double /*frs2*/);
    54 double vis_fmul8x16au(float /*frs1*/, float /*frs2*/);
    55 double vis_fmul8x16al(float /*frs1*/, float /*frs2*/);
    56 double vis_fmul8sux16(double /*frs1*/, double /*frs2*/);
    57 double vis_fmul8ulx16(double /*frs1*/, double /*frs2*/);
    58 double vis_fmuld8ulx16(float /*frs1*/, float /*frs2*/);
    59 double vis_fmuld8sux16(float /*frs1*/, float /*frs2*/);
    61 /* Partitioned addition & subtraction. */
    62 double vis_fpadd16(double /*frs1*/, double /*frs2*/);
    63 float vis_fpadd16s(float /*frs1*/, float /*frs2*/);
    64 double vis_fpadd32(double /*frs1*/, double /*frs2*/);
    65 float vis_fpadd32s(float /*frs1*/, float /*frs2*/);
    66 double vis_fpsub16(double /*frs1*/, double /*frs2*/);
    67 float vis_fpsub16s(float /*frs1*/, float /*frs2*/);
    68 double vis_fpsub32(double /*frs1*/, double /*frs2*/);
    69 float vis_fpsub32s(float /*frs1*/, float /*frs2*/);
    71 /* Pixel packing & clamping. */
    72 float vis_fpack16(double /*frs2*/);
    73 double vis_fpack32(double /*frs1*/, double /*frs2*/);
    74 float vis_fpackfix(double /*frs2*/);
    76 /* Combined pack ops. */
    77 double vis_fpack16_pair(double /*frs2*/, double /*frs2*/);
    78 double vis_fpackfix_pair(double /*frs2*/, double /*frs2*/);
    79 void vis_st2_fpack16(double, double, double *);
    80 void vis_std_fpack16(double, double, double *);
    81 void vis_st2_fpackfix(double, double, double *);
    83 double vis_fpack16_to_hi(double /*frs1*/, double /*frs2*/);
    84 double vis_fpack16_to_lo(double /*frs1*/, double /*frs2*/);
    86 /* Motion estimation. */
    87 double vis_pdist(double /*frs1*/, double /*frs2*/, double /*frd*/);
    89 /* Channel merging. */
    90 double vis_fpmerge(float /*frs1*/, float /*frs2*/);
    92 /* Pixel expansion. */
    93 double vis_fexpand(float /*frs2*/);
    94 double vis_fexpand_hi(double /*frs2*/);
    95 double vis_fexpand_lo(double /*frs2*/);
    97 /* Bitwise logical operators. */
    98 double vis_fnor(double /*frs1*/, double /*frs2*/);
    99 float vis_fnors(float /*frs1*/, float /*frs2*/);
   100 double vis_fandnot(double /*frs1*/, double /*frs2*/);
   101 float vis_fandnots(float /*frs1*/, float /*frs2*/);
   102 double vis_fnot(double /*frs1*/);
   103 float vis_fnots(float /*frs1*/);
   104 double vis_fxor(double /*frs1*/, double /*frs2*/);
   105 float vis_fxors(float /*frs1*/, float /*frs2*/);
   106 double vis_fnand(double /*frs1*/, double /*frs2*/);
   107 float vis_fnands(float /*frs1*/, float /*frs2*/);
   108 double vis_fand(double /*frs1*/, double /*frs2*/);
   109 float vis_fands(float /*frs1*/, float /*frs2*/);
   110 double vis_fxnor(double /*frs1*/, double /*frs2*/);
   111 float vis_fxnors(float /*frs1*/, float /*frs2*/);
   112 double vis_fsrc(double /*frs1*/);
   113 float vis_fsrcs(float /*frs1*/);
   114 double vis_fornot(double /*frs1*/, double /*frs2*/);
   115 float vis_fornots(float /*frs1*/, float /*frs2*/);
   116 double vis_for(double /*frs1*/, double /*frs2*/);
   117 float vis_fors(float /*frs1*/, float /*frs2*/);
   118 double vis_fzero(void);
   119 float vis_fzeros(void);
   120 double vis_fone(void);
   121 float vis_fones(void);
   123 /* Partial stores. */
   124 void vis_stdfa_ASI_PST8P(double /*frd*/, void * /*rs1*/, int /*rmask*/);
   125 void vis_stdfa_ASI_PST8PL(double /*frd*/, void * /*rs1*/, int /*rmask*/);
   126 void vis_stdfa_ASI_PST8P_int_pair(void * /*rs1*/, void * /*rs2*/,
   127                                   void * /*rs3*/, int /*rmask*/);
   128 void vis_stdfa_ASI_PST8S(double /*frd*/, void * /*rs1*/, int /*rmask*/);
   129 void vis_stdfa_ASI_PST16P(double /*frd*/, void * /*rs1*/, int /*rmask*/);
   130 void vis_stdfa_ASI_PST16S(double /*frd*/, void * /*rs1*/, int /*rmask*/);
   131 void vis_stdfa_ASI_PST32P(double /*frd*/, void * /*rs1*/, int /*rmask*/);
   132 void vis_stdfa_ASI_PST32S(double /*frd*/, void * /*rs1*/, int /*rmask*/);
   134 /* Byte & short stores. */
   135 void vis_stdfa_ASI_FL8P(double /*frd*/, void * /*rs1*/);
   136 void vis_stdfa_ASI_FL8P_index(double /*frd*/, void * /*rs1*/, long /*index*/);
   137 void vis_stdfa_ASI_FL8S(double /*frd*/, void * /*rs1*/);
   138 void vis_stdfa_ASI_FL16P(double /*frd*/, void * /*rs1*/);
   139 void vis_stdfa_ASI_FL16P_index(double /*frd*/, void * /*rs1*/, long /*index*/);
   140 void vis_stdfa_ASI_FL16S(double /*frd*/, void * /*rs1*/);
   141 void vis_stdfa_ASI_FL8PL(double /*frd*/, void * /*rs1*/);
   142 void vis_stdfa_ASI_FL8SL(double /*frd*/, void * /*rs1*/);
   143 void vis_stdfa_ASI_FL16PL(double /*frd*/, void * /*rs1*/);
   144 void vis_stdfa_ASI_FL16SL(double /*frd*/, void * /*rs1*/);
   146 /* Byte & short loads. */
   147 double vis_lddfa_ASI_FL8P(void * /*rs1*/);
   148 double vis_lddfa_ASI_FL8P_index(void * /*rs1*/, long /*index*/);
   149 double vis_lddfa_ASI_FL8P_hi(void * /*rs1*/, unsigned int /*index*/);
   150 double vis_lddfa_ASI_FL8P_lo(void * /*rs1*/, unsigned int /*index*/);
   151 double vis_lddfa_ASI_FL8S(void * /*rs1*/);
   152 double vis_lddfa_ASI_FL16P(void * /*rs1*/);
   153 double vis_lddfa_ASI_FL16P_index(void * /*rs1*/, long /*index*/);
   154 double vis_lddfa_ASI_FL16S(void * /*rs1*/);
   155 double vis_lddfa_ASI_FL8PL(void * /*rs1*/);
   156 double vis_lddfa_ASI_FL8SL(void * /*rs1*/);
   157 double vis_lddfa_ASI_FL16PL(void * /*rs1*/);
   158 double vis_lddfa_ASI_FL16SL(void * /*rs1*/);
   160 /* Direct write to GSR, read from GSR */
   161 void vis_write_gsr(unsigned int /*GSR*/);
   162 unsigned int vis_read_gsr(void);
   164 /* Voxel texture mapping. */
   165 #if !defined(_NO_LONGLONG)
   166 unsigned long vis_array8(unsigned long long /*rs1*/, int /*rs2*/);
   167 unsigned long vis_array16(unsigned long long /*rs1*/, int /*rs2*/);
   168 unsigned long vis_array32(unsigned long long /*rs1*/, int /*rs2*/);
   169 #endif /* !defined(_NO_LONGLONG) */
   171 /* Register aliasing and type casts. */
   172 float vis_read_hi(double /*frs1*/);
   173 float vis_read_lo(double /*frs1*/);
   174 double vis_write_hi(double /*frs1*/, float /*frs2*/);
   175 double vis_write_lo(double /*frs1*/, float /*frs2*/);
   176 double vis_freg_pair(float /*frs1*/, float /*frs2*/);
   177 float vis_to_float(unsigned int /*value*/);
   178 double vis_to_double(unsigned int /*value1*/, unsigned int /*value2*/);
   179 double vis_to_double_dup(unsigned int /*value*/);
   180 #if !defined(_NO_LONGLONG)
   181 double vis_ll_to_double(unsigned long long /*value*/);
   182 #endif /* !defined(_NO_LONGLONG) */
   184 /* Miscellany (no inlines) */
   185 void vis_error(char * /*fmt*/, int /*a0*/);
   186 void vis_sim_init(void);
   188 /* For better performance */
   189 #define vis_fmul8x16(farg,darg) vis_fmul8x16_dummy((farg),0,(darg))
   191 /* Nicknames for explicit ASI loads and stores. */
   192 #define vis_st_u8      vis_stdfa_ASI_FL8P
   193 #define vis_st_u8_i    vis_stdfa_ASI_FL8P_index
   194 #define vis_st_u8_le   vis_stdfa_ASI_FL8PL
   195 #define vis_st_u16     vis_stdfa_ASI_FL16P
   196 #define vis_st_u16_i   vis_stdfa_ASI_FL16P_index
   197 #define vis_st_u16_le  vis_stdfa_ASI_FL16PL
   199 #define vis_ld_u8      vis_lddfa_ASI_FL8P
   200 #define vis_ld_u8_i    vis_lddfa_ASI_FL8P_index
   201 #define vis_ld_u8_le   vis_lddfa_ASI_FL8PL
   202 #define vis_ld_u16     vis_lddfa_ASI_FL16P
   203 #define vis_ld_u16_i   vis_lddfa_ASI_FL16P_index
   204 #define vis_ld_u16_le  vis_lddfa_ASI_FL16PL
   206 #define vis_pst_8      vis_stdfa_ASI_PST8P
   207 #define vis_pst_16     vis_stdfa_ASI_PST16P
   208 #define vis_pst_32     vis_stdfa_ASI_PST32P
   210 #define vis_st_u8s     vis_stdfa_ASI_FL8S
   211 #define vis_st_u8s_le  vis_stdfa_ASI_FL8SL
   212 #define vis_st_u16s    vis_stdfa_ASI_FL16S
   213 #define vis_st_u16s_le vis_stdfa_ASI_FL16SL
   215 #define vis_ld_u8s     vis_lddfa_ASI_FL8S
   216 #define vis_ld_u8s_le  vis_lddfa_ASI_FL8SL
   217 #define vis_ld_u16s    vis_lddfa_ASI_FL16S
   218 #define vis_ld_u16s_le vis_lddfa_ASI_FL16SL
   220 #define vis_pst_8s     vis_stdfa_ASI_PST8S
   221 #define vis_pst_16s    vis_stdfa_ASI_PST16S
   222 #define vis_pst_32s    vis_stdfa_ASI_PST32S
   224 /* "<" and ">=" may be implemented in terms of ">" and "<=". */
   225 #define vis_fcmplt16(a,b) vis_fcmpgt16((b),(a))
   226 #define vis_fcmplt32(a,b) vis_fcmpgt32((b),(a))
   227 #define vis_fcmpge16(a,b) vis_fcmple16((b),(a))
   228 #define vis_fcmpge32(a,b) vis_fcmple32((b),(a))
   230 #ifdef __cplusplus
   231 } // End of extern "C"
   232 #endif /* __cplusplus */
   234 #endif /* VIS_PROTO_H */

mercurial