Changeset 63 for trunk/src


Ignore:
Timestamp:
Mar 2, 2008, 5:46:50 AM (11 years ago)
Author:
cameron
Message:

Bug fix - buffer_blocks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bitlex.c

    r60 r63  
    177177        BitBlock SP = simd_andc(temp13, temp16);
    178178        WS = simd_or(simd_or(CR, LF), simd_or(HT, SP));
     179#ifdef DEBUG_BITSTREAMS
     180print_bit_block("bit[0]", bit[0]);
     181print_bit_block("bit[1]", bit[1]);
     182print_bit_block("bit[2]", bit[2]);
     183print_bit_block("bit[3]", bit[3]);
     184print_bit_block("bit[4]", bit[4]);
     185print_bit_block("bit[5]", bit[5]);
     186print_bit_block("bit[6]", bit[6]);
     187print_bit_block("bit[7]", bit[7]);
     188print_bit_block("LF", LF);
     189print_bit_block("HT", HT);
     190print_bit_block("CR", CR);
     191print_bit_block("Control", Control);
     192#endif
    179193}
    180194
     
    254268        BitBlock final_block_mask;
    255269        for (int i = 0; i < buffer_blocks; i++) {
     270#ifdef DEBUG_BITSTREAMS
     271printf("i=%i, buffer_blocks = %i\n", i, buffer_blocks);
     272#endif
    256273                Restricted = simd_or(Restricted, simd_andc(Control, WS));
    257274                WS_Control_Blocks<C>(x8basis[i].bit,
     
    343360        BitBlock temp46 = simd_and(temp45, temp41);
    344361        BitBlock Hex = simd_or(temp43, temp46);
     362#ifdef DEBUG_BITSTREAMS
     363print_bit_block("bit[0]", bit[0]);
     364print_bit_block("bit[1]", bit[1]);
     365print_bit_block("bit[2]", bit[2]);
     366print_bit_block("bit[3]", bit[3]);
     367print_bit_block("bit[4]", bit[4]);
     368print_bit_block("bit[5]", bit[5]);
     369print_bit_block("bit[6]", bit[6]);
     370print_bit_block("bit[7]", bit[7]);
     371#endif
    345372        LexItem[NonDigit] = simd_not(Digit);
    346373        LexItem[NonHex] = simd_not(Hex);
     
    885912                        sisd_sfl(simd_const_1(1), sisd_from_int(buffer_units % BLOCKSIZE));
    886913        }
    887         buffer_blocks = (buffer_units -1)/BLOCKSIZE + 1;
     914        buffer_blocks = (buffer_units + BLOCKSIZE - 1)/BLOCKSIZE;
    888915#ifdef DEBUG
    889916        printf("Transpose for abspos = %i, lexer_base_pos= %i, buffer_blocks = %i.\n", abspos, lexer_base_pos, buffer_blocks);
Note: See TracChangeset for help on using the changeset viewer.