Changeset 464 for proto/u16u8
 Timestamp:
 Jul 11, 2010, 1:43:06 PM (9 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

proto/u16u8/template.c
r393 r464 6 6 #include <sys/types.h> 7 7 #include <sys/stat.h> 8 #include "lib/lib_simd.h" 8 9 #include "../lib/lib_simd.h" 10 #include "../lib/block_carry.h" 11 12 9 13 #define min(x,y) ((x) <(y) ?(x) :(y) ) \ 10 14 … … 14 18 15 19 // Profiling 20 #define BUFFER_PROFILING 21 #include "../lib/perflib/perfsec.h" 16 22 17 23 #ifdef BUFFER_PROFILING 18 #include "../Profiling/BOM_Profiler.c"19 24 BOM_Table * transcode_timer; 20 25 #endif … … 192 197 } 193 198 194 #define double_int64_adc(x1, x2, y1, y2, rslt1, rslt2, carry) \195 __asm__ ("sahf\n\t" \196 "adc %[e1], %[z1]\n\t" \197 "adc %[e2], %[z2]\n\t" \198 "lahf\n\t" \199 : [z1] "=r" (rslt1), [z2] "=r" (rslt2), [carryflag] "=a" (carry) \200 : "[z1]" (x1), "[z2]" (x2), \201 [e1] "r" (y1), [e2] "r" (y2), \202 "[carryflag]" (carry) \203 : "cc")204 205 #define adc128(first, second, carry, sum) \206 do\207 {\208 union {__m128i bitblock;\209 uint64_t int64[2];} rslt;\210 \211 union {__m128i bitblock;\212 uint64_t int64[2];} x;\213 \214 union {__m128i bitblock;\215 uint64_t int64[2];} y;\216 \217 x.bitblock = first;\218 y.bitblock = second;\219 \220 double_int64_adc(x.int64[0], x.int64[1], y.int64[0], y.int64[1], rslt.int64[0], rslt.int64[1], carry);\221 sum = rslt.bitblock;\222 }while(0)223 224 #define double_int64_sbb(x1, x2, y1, y2, rslt1, rslt2, carry) \225 __asm__ ("sahf\n\t" \226 "sbb %[e1], %[z1]\n\t" \227 "sbb %[e2], %[z2]\n\t" \228 "lahf\n\t" \229 : [z1] "=r" (rslt1), [z2] "=r" (rslt2), [carryflag] "=a" (carry) \230 : "[z1]" (x1), "[z2]" (x2), \231 [e1] "r" (y1), [e2] "r" (y2), \232 "[carryflag]" (carry) \233 : "cc")234 235 236 #define sbb128(first, second, carry, sum) \237 do\238 { union {__m128i bitblock;\239 uint64_t int64[2];} rslt;\240 \241 union {__m128i bitblock;\242 uint64_t int64[2];} x;\243 \244 union {__m128i bitblock;\245 uint64_t int64[2];} y;\246 \247 x.bitblock = first;\248 y.bitblock = second;\249 \250 double_int64_sbb(x.int64[0], x.int64[1], y.int64[0], y.int64[1], \251 rslt.int64[0], rslt.int64[1], carry);\252 sum = rslt.bitblock;\253 }while(0)254 199 255 200 … … 284 229 int err_pos; 285 230 286 231 @stream_stmts 287 232 288 233 do { … … 328 273 array_u16h__7_ = u16h [7]; 329 274 330 @ stmts275 @block_stmts 331 276 332 277 /* Convert flattened array values to arrays */
Note: See TracChangeset
for help on using the changeset viewer.