Changeset 464 for proto


Ignore:
Timestamp:
Jul 11, 2010, 1:43:06 PM (9 years ago)
Author:
cameron
Message:

Revise template for latest compiler.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/u16u8/template.c

    r393 r464  
    66#include <sys/types.h>
    77#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
    913#define min(x,y) ((x) <(y) ?(x) :(y) )  \
    1014
     
    1418
    1519// Profiling
     20#define BUFFER_PROFILING
     21#include "../lib/perflib/perfsec.h"
    1622
    1723#ifdef BUFFER_PROFILING
    18 #include "../Profiling/BOM_Profiler.c"
    1924BOM_Table * transcode_timer;
    2025#endif
     
    192197}
    193198
    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)
    254199
    255200
     
    284229  int err_pos;
    285230
    286 
     231  @stream_stmts
    287232
    288233  do {
     
    328273array_u16h__7_ = u16h [7];
    329274
    330     @stmts
     275    @block_stmts
    331276
    332277/* Convert flattened array values to arrays */
Note: See TracChangeset for help on using the changeset viewer.