Changeset 648


Ignore:
Timestamp:
Oct 12, 2010, 5:57:19 AM (9 years ago)
Author:
cameron
Message:

Fix error adjustments for 4-byte sequences

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/u8u16/template.c

    r647 r648  
    181181        if (bitblock_has_bit(simd_and(strct_u8__scope44_, errbit))) {
    182182          u8advance -= 3;
    183           if (u8advance <= -2) *targetbuf -= 2;
    184           if (u8advance <= 0) return;
     183          /* May have already first of a surrogate pair to targetbuf. */
     184          if (u8advance == -3) *targetbuf -= 2;
    185185        }
    186186        else if (bitblock_has_bit(simd_and(strct_u8__scope43_, errbit))) {
    187187          u8advance -= 2;
    188           if (u8advance <= -2) *targetbuf -= 2;
    189           if (u8advance <= 0) return;
    190188        }
    191189        else if (bitblock_has_bit(simd_and(strct_u8__scope33_, errbit))) {
    192190          u8advance -= 2;
    193           if (u8advance <= 0) return;
    194191        }
    195192        else if (bitblock_has_bit(simd_and(simd_or(strct_u8__scope22_, simd_or(strct_u8__scope32_, strct_u8__scope42_)), errbit))) {
    196193          u8advance -= 1;
    197           if (u8advance <= 0) return;
     194        }
     195        if (u8advance <= 0) {
     196          (*srcbuf) += u8advance;
     197          return;
    198198        }
    199199        delmask |= sisd_sfl(simd_const_8(-1), sisd_from_int(u8advance));
     
    239239        *targetbuf += u16_units_per_reg[j];
    240240      }
    241      
    242      
     241
    243242      (*srcbuf) += u8advance;
    244       if (error_found) {
    245         return;
    246       }
     243         
     244      if (error_found) return;
    247245    }
    248246
Note: See TracChangeset for help on using the changeset viewer.