Changeset 658


Ignore:
Timestamp:
Oct 13, 2010, 3:28:31 PM (9 years ago)
Author:
ksherdy
Message:

Restore byteclass.py

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/parabix2/src/xmlwf.c

    r627 r658  
    2424#include "../lib/s2p.h"
    2525
    26 #include "tag_matcher.cpp"
     26#include "tag_matcher.h"
    2727
    2828#ifdef BUFFER_PROFILING
     
    246246        if(s[0]=='#'){
    247247          s++;
    248           if(s[0]=='x' or s[0]=='X'){
     248          if(s[0]=='x' || s[0]=='X'){
    249249            s++;
    250250            while(at_HexDigit<ASCII>(s)){
     
    373373BitBlock strct_control__x00_x1F_;
    374374BitBlock AttValEnds;
    375 BitBlock NumRef3;
     375BitBlock GenRefEnds;
    376376BitBlock Temp368;
    377377BitBlock Ct_starts;
     
    528528BitBlock AttNameStarts;
    529529BitBlock NumRef2;
    530 BitBlock GenRefEnds;
     530BitBlock NumRef3;
    531531BitBlock strct_u8__xBF_;
    532532BitBlock SQuoteAttEnd;
     
    636636BitBlock AttValFollow;
    637637BitBlock AttValStarts;
     638CarryType CarryTemp196 = Carry0;
    638639CarryType carry24_i = Carry0;
    639640CarryType carry28 = Carry0;
     
    679680CarryType CarryTemp128 = Carry0;
    680681CarryType carry23_i = Carry0;
    681 CarryType CarryTemp193 = Carry0;
    682682CarryType carry38 = Carry0;
    683683CarryType carry30_i = Carry0;
     
    741741  int check_pos = 0;
    742742  int chars_read = 0;
    743   char buf[BUFFER_SIZE+BLOCK_SIZE+OVERLAP_BUFSIZE*2];
     743  BytePack buf[(BUFFER_SIZE+BLOCK_SIZE+OVERLAP_BUFSIZE*2)/sizeof(SIMD_type)];
    744744 
    745   char * srcbuf = buf + OVERLAP_BUFSIZE;
     745  char * srcbuf = ((char *) buf) + OVERLAP_BUFSIZE;
    746746  buffer_base = buf_pos;
    747747  source = srcbuf;
     
    768768   
    769769    if (e->code_unit_size != SingleByte || (e->has_encoding_decl && (!at_UTF_8(e->encoding)))){
    770         fprintf(stderr,"Sorry, we only process UTF-8.\n");
     770        fprintf(stderr,"Sorry, this xmlwf demo only works for UTF-8.\n");
    771771        exit(-1);
    772772    }
    773773  }
    774774  else {
    775     fprintf(stderr,"Sorry, we don't process EBCDIC.\n");
     775    fprintf(stderr,"Sorry, this xmlwf demo does not process EBCDIC.\n");
    776776        exit(-1);
    777777  }
     
    810810          EOF_mask = sisd_srl(simd_const_1(1),sisd_from_int(BLOCK_SIZE-bytes));
    811811        }
    812         BytePack * U8pack = (BytePack *) &srcbuf[block_pos];
    813         U8[0] = sisd_load_unaligned(&U8pack[0]);
    814         U8[1] = sisd_load_unaligned(&U8pack[1]);
    815         U8[2] = sisd_load_unaligned(&U8pack[2]);
    816         U8[3] = sisd_load_unaligned(&U8pack[3]);
    817         U8[4] = sisd_load_unaligned(&U8pack[4]);
    818         U8[5] = sisd_load_unaligned(&U8pack[5]);
    819         U8[6] = sisd_load_unaligned(&U8pack[6]);
    820         U8[7] = sisd_load_unaligned(&U8pack[7]);
     812        BytePack * U8 = (BytePack *) &srcbuf[block_pos];
    821813       
    822814        s2p(U8[0], U8[1], U8[2], U8[3], U8[4], U8[5], U8[6], U8[7],
     
    13141306strct_refs__GenRefs_ = AllZero;
    13151307strct_refs__error_ = AllZero;
     1308Ref2 = AllZero;
    13161309GenRef2 = AllZero;
     1310DecRef3 = AllZero;
     1311HexRef4 = AllZero;
    13171312Ref1 = simd_andc(strct_lex__RefStart_,strct_CT_callouts__CtCDPI_mask_);
    13181313
    1319 if ((bitblock_has_bit(Ref1))||(test_carry(CarryTemp193))) {
    1320     CarryTemp193 = Carry0;
     1314if ((bitblock_has_bit(Ref1))||(test_carry(CarryTemp196))) {
     1315    CarryTemp196 = Carry0;
    13211316    advance_with_carry(Ref1, carry48, Ref2);
    13221317    NumRef2 = simd_and(Ref2,strct_lex__Hash_);
     
    13411336    strct_refs__error_ = simd_or(Temp363,error3);
    13421337}
    1343 CarryTemp193 = carry_or(carry48, carry49);
    1344 CarryTemp193 = carry_or(CarryTemp193, carry_brw7);
    1345 CarryTemp193 = carry_or(CarryTemp193, carry53);
    1346 CarryTemp193 = carry_or(CarryTemp193, carry52);
    1347 CarryTemp193 = carry_or(CarryTemp193, carry51);
    1348 CarryTemp193 = carry_or(CarryTemp193, carry50);
     1338CarryTemp196 = carry_or(carry48, carry49);
     1339CarryTemp196 = carry_or(CarryTemp196, carry_brw7);
     1340CarryTemp196 = carry_or(CarryTemp196, carry53);
     1341CarryTemp196 = carry_or(CarryTemp196, carry52);
     1342CarryTemp196 = carry_or(CarryTemp196, carry51);
     1343CarryTemp196 = carry_or(CarryTemp196, carry50);
    13491344Temp365 = simd_or(strct_CT_callouts__CtCDPI_mask_,strct_callouts__Tags_);
    13501345CD_end_error = simd_andc(strct_lex__CD_end_,Temp365);
     
    14301425        block_base = block_pos;
    14311426         
    1432         BytePack * U8pack = (BytePack *) &srcbuf[block_pos];
    1433         U8[0] = sisd_load_unaligned(&U8pack[0]);
    1434         U8[1] = sisd_load_unaligned(&U8pack[1]);
    1435         U8[2] = sisd_load_unaligned(&U8pack[2]);
    1436         U8[3] = sisd_load_unaligned(&U8pack[3]);
    1437         U8[4] = sisd_load_unaligned(&U8pack[4]);
    1438         U8[5] = sisd_load_unaligned(&U8pack[5]);
    1439         U8[6] = sisd_load_unaligned(&U8pack[6]);
    1440         U8[7] = sisd_load_unaligned(&U8pack[7]);
     1427        BytePack * U8 = (BytePack *) &srcbuf[block_pos];
    14411428       
    14421429        s2p(U8[0], U8[1], U8[2], U8[3], U8[4], U8[5], U8[6], U8[7],
     
    19251912strct_refs__GenRefs_ = AllZero;
    19261913strct_refs__error_ = AllZero;
     1914Ref2 = AllZero;
    19271915GenRef2 = AllZero;
     1916DecRef3 = AllZero;
     1917HexRef4 = AllZero;
    19281918Ref1 = simd_andc(strct_lex__RefStart_,strct_CT_callouts__CtCDPI_mask_);
    19291919
    1930 if ((bitblock_has_bit(Ref1))||(test_carry(CarryTemp193))) {
    1931     CarryTemp193 = Carry0;
     1920if ((bitblock_has_bit(Ref1))||(test_carry(CarryTemp196))) {
     1921    CarryTemp196 = Carry0;
    19321922    advance_with_carry(Ref1, carry48, Ref2);
    19331923    NumRef2 = simd_and(Ref2,strct_lex__Hash_);
     
    19521942    strct_refs__error_ = simd_or(Temp363,error3);
    19531943}
    1954 CarryTemp193 = carry_or(carry48, carry49);
    1955 CarryTemp193 = carry_or(CarryTemp193, carry_brw7);
    1956 CarryTemp193 = carry_or(CarryTemp193, carry53);
    1957 CarryTemp193 = carry_or(CarryTemp193, carry52);
    1958 CarryTemp193 = carry_or(CarryTemp193, carry51);
    1959 CarryTemp193 = carry_or(CarryTemp193, carry50);
     1944CarryTemp196 = carry_or(carry48, carry49);
     1945CarryTemp196 = carry_or(CarryTemp196, carry_brw7);
     1946CarryTemp196 = carry_or(CarryTemp196, carry53);
     1947CarryTemp196 = carry_or(CarryTemp196, carry52);
     1948CarryTemp196 = carry_or(CarryTemp196, carry51);
     1949CarryTemp196 = carry_or(CarryTemp196, carry50);
    19601950Temp365 = simd_or(strct_CT_callouts__CtCDPI_mask_,strct_callouts__Tags_);
    19611951CD_end_error = simd_andc(strct_lex__CD_end_,Temp365);
Note: See TracChangeset for help on using the changeset viewer.