Changeset 766 for proto/JSON/src
 Timestamp:
 Dec 2, 2010, 1:44:34 PM (8 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

proto/JSON/src/json.c
r755 r766 39 39 BitBlock temp41; 40 40 BitBlock strct_Lex__RSquareBracket_; 41 BitBlock strct_Lex__Ee_;41 BitBlock temp43; 42 42 BitBlock temp44; 43 43 BitBlock temp45; … … 47 47 BitBlock temp49; 48 48 BitBlock temp42; 49 BitBlock StringErrors_1; 50 BitBlock strct_u8__xF4_; 51 BitBlock StringErrors_3; 52 BitBlock temp43; 53 BitBlock StringErrors_5; 54 BitBlock StringErrors_4; 55 BitBlock strct_Lex__True_; 49 BitBlock FalseErrors_1; 50 BitBlock M4b; 51 BitBlock M4a; 52 BitBlock TrueSpans; 56 53 BitBlock strct_Lex__DecimalPoint_; 57 54 BitBlock strct_Lex__Null_; 58 BitBlock temp10;59 55 BitBlock array_bit__2_; 60 56 BitBlock strct_u8__suffix_; 61 BitBlock StringSpans_6; 57 BitBlock Scope3; 58 BitBlock strct_Lex__n_; 59 BitBlock EvenEscape; 60 BitBlock StringEscapeChars; 61 BitBlock OddFinal; 62 BitBlock Temp40; 63 BitBlock Temp41; 64 BitBlock Temp42; 65 BitBlock strct_u8__unibyte_; 66 BitBlock temp81; 67 BitBlock NullSpans; 68 BitBlock strct_u8__xED_; 69 BitBlock temp28; 70 BitBlock temp29; 71 BitBlock temp22; 72 BitBlock temp23; 73 BitBlock temp20; 74 BitBlock temp21; 75 BitBlock temp26; 76 BitBlock temp27; 77 BitBlock temp24; 78 BitBlock temp25; 79 BitBlock M4; 80 BitBlock M7; 81 BitBlock M6; 82 BitBlock M1; 83 BitBlock M0; 84 BitBlock strct_Lex__a_; 85 BitBlock M2b; 86 BitBlock strct_u8__x80_x8F_; 87 BitBlock TrueErrors_5; 88 BitBlock AtomSpans; 89 BitBlock array_bit__0_; 90 BitBlock strct_Lex__Minus_; 91 BitBlock strct_u8__prefix4_; 92 BitBlock strct_Lex__LCurlyBrace_; 93 BitBlock ParityMask; 94 BitBlock temp36; 95 BitBlock AllZero = simd_const_1(0); 96 BitBlock Temp28; 97 BitBlock Temp29; 98 BitBlock EvenFinal; 99 BitBlock Temp22; 100 BitBlock Temp23; 101 BitBlock Temp20; 102 BitBlock Temp21; 103 BitBlock Temp26; 104 BitBlock Temp27; 105 BitBlock Temp24; 106 BitBlock Temp25; 107 BitBlock Escape; 108 BitBlock StringMask; 109 BitBlock strct_u8__x90_xBF_; 110 BitBlock M3b; 111 BitBlock M9b; 112 BitBlock Scope3_6; 113 BitBlock Scope3_7; 114 BitBlock strct_Lex__Comma_; 115 BitBlock array_bit__7_; 116 BitBlock strct_Lex__Colon_; 117 BitBlock OddStart; 118 BitBlock Scope2; 119 BitBlock StringNotEscapedChars; 120 BitBlock Scope1; 121 BitBlock Scope4; 122 BitBlock strct_Lex__e_; 123 BitBlock TrueErrors_4; 124 BitBlock strct_u8__xA0_xBF_; 125 BitBlock strct_u8__prefix3_; 126 BitBlock FalseSpans; 127 BitBlock strct_Lex__PlusMinus_; 128 BitBlock M9b_10; 129 BitBlock M5b_0; 130 BitBlock strct_u8__x80_x9F_; 131 BitBlock StringErrors_20; 132 BitBlock StringErrors_21; 133 BitBlock StringErrors_22; 134 BitBlock StringEnds; 135 BitBlock temp75; 136 BitBlock temp74; 137 BitBlock temp77; 138 BitBlock E9b; 139 BitBlock temp71; 140 BitBlock temp70; 141 BitBlock temp73; 142 BitBlock temp72; 143 BitBlock strct_Lex__LSquareBracket_; 144 BitBlock temp79; 145 BitBlock temp78; 146 BitBlock M7b; 147 BitBlock M7a; 148 BitBlock strct_u8__prefix_; 149 BitBlock strct_Lex__s_; 150 BitBlock strct_Lex__WS_; 151 BitBlock AllOne = simd_const_1(1); 152 BitBlock strct_Lex__t_; 153 BitBlock strct_Ctrl__LF_; 154 BitBlock StringSpans; 155 BitBlock Follows_8; 156 BitBlock Follows_9; 157 BitBlock strct_Ctrl__CR_; 158 BitBlock strct_u8__badprefix_; 159 BitBlock strct_Lex__Zero_; 160 BitBlock strct_Lex__RCurlyBrace_; 161 BitBlock strct_Lex__Ee_; 162 BitBlock strct_u8__xF4_; 163 BitBlock strct_Lex__Digit1_9_; 164 BitBlock strct_Lex__True_; 165 BitBlock temp10; 166 BitBlock EvenStart; 167 BitBlock NullErrors_12; 168 BitBlock NullErrors_11; 62 169 BitBlock strct_u8__xE0_; 63 170 BitBlock temp59; … … 67 174 BitBlock temp55; 68 175 BitBlock temp54; 69 BitBlock strct_Lex__LSquareBracket_;176 BitBlock temp53; 70 177 BitBlock temp52; 71 178 BitBlock temp51; 72 179 BitBlock temp50; 73 BitBlock Temp9; 74 BitBlock strct_Ctrl__CR_; 180 BitBlock Temp43; 75 181 BitBlock strct_Lex__f_; 182 BitBlock M5b; 76 183 BitBlock UnescapedDQuotes; 77 BitBlock StringEscapeChars; 78 BitBlock OddFinal; 79 BitBlock strct_u8__unibyte_; 80 BitBlock StringErrors_0; 184 BitBlock AtomsSpans; 81 185 BitBlock TrueStarts; 82 BitBlock StringErrors_2;186 BitBlock FalseErrors; 83 187 BitBlock array_bit__3_; 84 BitBlock strct_u8__xED_;85 188 BitBlock strct_Ctrl__HT_; 86 BitBlock temp28; 87 BitBlock temp29; 88 BitBlock temp22; 89 BitBlock strct_Ctrl__SP_; 90 BitBlock temp20; 91 BitBlock temp21; 92 BitBlock temp26; 93 BitBlock temp27; 94 BitBlock temp24; 95 BitBlock temp25; 189 BitBlock uScope2; 190 BitBlock strct_Ctrl__x00_x1F_; 191 BitBlock temp30; 192 BitBlock uScope1; 193 BitBlock uScope4; 96 194 BitBlock temp3; 97 195 BitBlock temp2; 98 196 BitBlock temp1; 99 BitBlock OddEscape;197 BitBlock temp76; 100 198 BitBlock temp7; 101 199 BitBlock temp6; … … 104 202 BitBlock temp9; 105 203 BitBlock temp8; 106 BitBlock strct_Lex__a_;107 204 BitBlock StringStarts; 108 BitBlock strct_u8__x80_x8F_;205 BitBlock TrueErrors; 109 206 BitBlock StringCursor; 110 207 BitBlock NullStarts; 111 BitBlock StringMask; 112 BitBlock strct_Lex__Digit1_9_; 208 BitBlock M10b; 113 209 BitBlock strct_u8__prefix2_; 114 BitBlock AtomSpans;115 BitBlock array_bit__0_;210 BitBlock Scope1_15; 211 BitBlock E1; 116 212 BitBlock temp39; 117 213 BitBlock temp38; 118 BitBlock strct_Lex__Minus_;119 BitBlock strct_u8__prefix4_;120 214 BitBlock temp31; 121 BitBlock temp30;215 BitBlock array_bit__5_; 122 216 BitBlock temp33; 123 217 BitBlock temp32; 124 BitBlock strct_Lex__LCurlyBrace_;218 BitBlock temp35; 125 219 BitBlock temp34; 126 220 BitBlock temp37; 127 BitBlock temp36; 128 BitBlock ParityMask; 129 BitBlock AllZero = simd_const_1(0); 130 BitBlock temp35; 131 BitBlock EvenFinal; 132 BitBlock AtomStarts; 221 BitBlock E5b; 222 BitBlock NumberSpans; 133 223 BitBlock strct_Lex__DQuote_; 134 BitBlock Temp20;135 BitBlock Temp21;136 224 BitBlock strct_Lex__RSolidus_; 137 BitBlock Escape;138 225 BitBlock array_bit__1_; 139 226 BitBlock Even; 227 BitBlock Follows; 140 228 BitBlock array_bit__6_; 229 BitBlock error_mask; 141 230 BitBlock strct_Lex__r_; 142 231 BitBlock Start; 232 BitBlock Scope2_13; 233 BitBlock M1_23; 234 BitBlock Scope1_16; 143 235 BitBlock strct_u8__xF0_; 144 BitBlock temp14; 145 BitBlock strct_Ctrl__x00_x1F_; 146 BitBlock strct_u8__x90_xBF_; 147 BitBlock uScope2; 148 BitBlock strct_u8__badprefix_; 149 BitBlock EvenStart; 236 BitBlock Scope2_14; 237 BitBlock M1a; 238 BitBlock Temp38; 239 BitBlock M1b; 240 BitBlock Temp31; 241 BitBlock Temp30; 242 BitBlock Temp33; 243 BitBlock Temp32; 244 BitBlock Temp35; 245 BitBlock Temp34; 246 BitBlock Temp37; 247 BitBlock Temp36; 248 BitBlock strct_Ctrl__SP_; 150 249 BitBlock strct_Lex__False_; 151 BitBlock temp23;152 BitBlock uScope1;153 250 BitBlock strct_Lex__Digit0_9_; 154 BitBlock strct_Lex__Comma_; 155 BitBlock array_bit__7_; 156 BitBlock strct_Lex__Colon_; 157 BitBlock uScope4; 158 BitBlock temp53; 251 BitBlock NullErrors; 159 252 BitBlock FalseStarts; 160 BitBlock error_mask; 253 BitBlock FalseErrors_2; 254 BitBlock FalseErrors_3; 161 255 BitBlock NumberStarts; 162 BitBlock StringNotEscapedChars;163 BitBlock EscapeChars;164 256 BitBlock temp88; 165 257 BitBlock temp89; 166 BitBlock strct_Lex__e_;167 258 BitBlock temp84; 168 259 BitBlock temp85; … … 170 261 BitBlock temp87; 171 262 BitBlock temp80; 172 BitBlock temp81;263 BitBlock AtomStarts; 173 264 BitBlock temp82; 174 265 BitBlock temp83; 175 BitBlock strct_u8__xA0_xBF_;266 BitBlock M11; 176 267 BitBlock StringErrors; 177 BitBlock strct_u8__prefix3_; 268 BitBlock OddEscape; 269 BitBlock NumberErrors; 178 270 BitBlock Odd; 179 271 BitBlock temp66; … … 198 290 BitBlock Temp18; 199 291 BitBlock strct_Lex__u_; 200 BitBlock strct_u8__x80_x9F_;201 292 BitBlock uScope3; 202 BitBlock strct_Lex__Zero_; 203 BitBlock strct_Lex__WS_; 293 BitBlock M2a; 204 294 BitBlock temp13; 205 295 BitBlock temp12; … … 209 299 BitBlock temp16; 210 300 BitBlock temp15; 211 BitBlock StringEnds;301 BitBlock temp14; 212 302 BitBlock Temp7; 213 303 BitBlock temp19; 214 304 BitBlock temp18; 215 BitBlock temp75;216 BitBlock temp74;217 BitBlock temp77;218 BitBlock temp76;219 BitBlock temp71;220 BitBlock temp70;221 BitBlock temp73;222 BitBlock temp72;223 305 BitBlock strct_Lex__Number_; 224 BitBlock strct_Lex__n_;225 306 BitBlock strct_Lex__l_; 226 BitBlock temp79; 227 BitBlock temp78; 228 BitBlock strct_u8__prefix_; 229 BitBlock strct_Lex__s_; 230 BitBlock Temp5; 231 BitBlock EvenEscape; 232 BitBlock array_bit__5_; 233 BitBlock AllOne = simd_const_1(1); 234 BitBlock strct_Lex__t_; 235 BitBlock strct_Ctrl__LF_; 236 BitBlock StringSpans; 307 BitBlock StringErrors_17; 237 308 BitBlock strct_Lex__Escape_; 309 BitBlock StringErrors_19; 310 BitBlock StringErrors_18; 238 311 BitBlock Temp3; 239 312 BitBlock Temp2; … … 241 314 BitBlock u; 242 315 BitBlock Temp6; 243 BitBlock strct_Lex__PlusMinus_;316 BitBlock Temp5; 244 317 BitBlock Temp4; 245 318 BitBlock strct_Lex__HexDigit_; 246 BitBlock strct_Lex__RCurlyBrace_;319 BitBlock Temp9; 247 320 BitBlock Temp8; 248 BitBlock OddStart; 321 BitBlock M8b; 322 BitBlock Temp39; 323 CarryType carry28 = Carry0; 324 CarryType carry29 = Carry0; 325 CarryType carry20 = Carry0; 326 CarryType carry21 = Carry0; 327 CarryType carry22 = Carry0; 328 CarryType carry23 = Carry0; 329 CarryType carry24 = Carry0; 330 CarryType carry25 = Carry0; 331 CarryType carry26 = Carry0; 332 CarryType carry27 = Carry0; 249 333 CarryType carry1 = Carry0; 250 334 CarryType carry0 = Carry0; … … 257 341 CarryType carry9 = Carry0; 258 342 CarryType carry8 = Carry0; 343 CarryType carry15 = Carry0; 344 CarryType carry14 = Carry0; 345 CarryType carry17 = Carry0; 346 CarryType carry16 = Carry0; 347 CarryType carry11 = Carry0; 348 CarryType carry10 = Carry0; 349 CarryType carry13 = Carry0; 350 CarryType carry12 = Carry0; 351 CarryType carry19 = Carry0; 352 CarryType carry18 = Carry0; 353 CarryType carry_brw2 = Carry0; 354 CarryType carry_brw1 = Carry0; 259 355 CarryType carry_brw0 = Carry0; 260 CarryType carry10 = Carry0; 261 262 263 // BitBlock error_mask; // PyBit compiler auto declares this variables 356 CarryType carry32 = Carry0; 357 CarryType carry31 = Carry0; 358 CarryType carry30 = Carry0; 359 360 361 // BitBlock error_mask; // PyBit compiler auto declares this variable 264 362 BitBlock EOF_mask = simd_const_1(1); 265 363 … … 271 369 BitBlock high_bit_mask = sisd_high_bit_mask; 272 370 BitBlock high_bit_is_set; 273 // BitBlock ParityMask = simd_const_1(0); // P arityMask declaration via PyBit371 // BitBlock ParityMask = simd_const_1(0); // PyBit compiler auto declares this variable 274 372 BitBlock bitblock_parity_mask; 275 373 … … 465 563 Escape = simd_or(EvenEscape,OddEscape); 466 564 UnescapedDQuotes = simd_andc(strct_Lex__DQuote_,Escape); 565 566 /* Generate Parity Mask */ 567 high_bit_mask = sisd_high_bit_mask; 568 high_bit_is_set = simd_and(high_bit_mask, bitblock_parity_mask); 569 bitblock_parity_mask = sisd_add( simd_not(sisd_srl(high_bit_is_set, sisd_from_int(BLOCK_SIZE1))) , sisd_low_bit_mask); 570 ParityMask = bitblock_parallel_prefix_parity(UnescapedDQuotes, bitblock_parity_mask); 571 467 572 advance_with_carry(ParityMask, carry3, Temp8); 468 573 StringMask = simd_and(ParityMask,Temp8); 469 StringSpans _6= simd_or(StringMask,UnescapedDQuotes);574 StringSpans = simd_or(StringMask,UnescapedDQuotes); 470 575 Temp9 = simd_or(strct_Lex__True_,strct_Lex__False_); 471 576 Temp10 = simd_or(Temp9,strct_Lex__Null_); 472 577 Temp11 = simd_or(Temp10,strct_Lex__Number_); 473 AtomSpans = simd_or(Temp11,StringSpans _6);578 AtomSpans = simd_or(Temp11,StringSpans); 474 579 advance_with_carry(AtomSpans, carry4, Temp12); 475 580 AtomStarts = simd_andc(AtomSpans,Temp12); … … 479 584 FalseStarts = simd_and(AtomStarts,temp62); 480 585 NullStarts = simd_and(AtomStarts,temp64); 481 StringEscapeChars = simd_and(Escape Chars,StringMask);482 StringErrors_ 0= simd_andc(StringEscapeChars,strct_Lex__Escape_);586 StringEscapeChars = simd_and(Escape,StringMask); 587 StringErrors_17 = simd_andc(StringEscapeChars,strct_Lex__Escape_); 483 588 u = simd_and(StringEscapeChars,strct_Lex__u_); 484 589 advance_with_carry(u, carry5, uScope1); … … 487 592 advance_with_carry(uScope3, carry8, uScope4); 488 593 Temp13 = simd_andc(uScope1,strct_Lex__HexDigit_); 489 StringErrors_1 = simd_or(StringErrors_0,Temp13);594 StringErrors_18 = simd_or(StringErrors_17,Temp13); 490 595 Temp14 = simd_andc(uScope2,strct_Lex__HexDigit_); 491 StringErrors_ 2 = simd_or(StringErrors_1,Temp14);596 StringErrors_19 = simd_or(StringErrors_18,Temp14); 492 597 Temp15 = simd_andc(uScope3,strct_Lex__HexDigit_); 493 StringErrors_ 3 = simd_or(StringErrors_2,Temp15);598 StringErrors_20 = simd_or(StringErrors_19,Temp15); 494 599 Temp16 = simd_andc(uScope4,strct_Lex__HexDigit_); 495 StringErrors_ 4 = simd_or(StringErrors_3,Temp16);496 Temp17 = simd_or(Escape Chars,strct_Lex__RSolidus_);600 StringErrors_21 = simd_or(StringErrors_20,Temp16); 601 Temp17 = simd_or(Escape,strct_Lex__RSolidus_); 497 602 StringNotEscapedChars = simd_andc(StringMask,Temp17); 498 603 Temp18 = simd_and(StringNotEscapedChars,strct_Ctrl__x00_x1F_); 499 StringErrors_ 5 = simd_or(StringErrors_4,Temp18);604 StringErrors_22 = simd_or(StringErrors_21,Temp18); 500 605 advance_with_carry(StringStarts, carry9, StringCursor); 501 606 adc128(StringCursor, StringMask, carry10, Temp19); 502 607 StringEnds = simd_andc(Temp19,StringMask); 503 608 Temp20 = simd_andc(StringEnds,UnescapedDQuotes); 504 StringErrors = simd_or(StringErrors_5,Temp20); 505 sbb128(StringEnds, StringStarts, carry_brw0, Temp21); 506 StringSpans = simd_or(Temp21,StringEnds); 507 error_mask = StringErrors; 508 509 510 /* Generate Parity Mask */ 511 high_bit_mask = sisd_high_bit_mask; 512 high_bit_is_set = simd_and(high_bit_mask, bitblock_parity_mask); 513 bitblock_parity_mask = sisd_add( simd_not(sisd_srl(high_bit_is_set, sisd_from_int(BLOCK_SIZE1))) , sisd_low_bit_mask); 514 ParityMask = bitblock_parallel_prefix_parity(UnescapedDQuotes, bitblock_parity_mask); 609 StringErrors = simd_or(StringErrors_22,Temp20); 610 M0 = NumberStarts; 611 Temp21 = simd_and(strct_Lex__Minus_,NumberStarts); 612 adc128(NumberStarts, Temp21, carry11, Temp22); 613 M1_23 = simd_andc(Temp22,Temp21); 614 Temp23 = simd_or(strct_Lex__Zero_,strct_Lex__Digit1_9_); 615 E1 = simd_andc(M1_23,Temp23); 616 M1 = simd_andc(M1_23,E1); 617 M1a = simd_and(M1,strct_Lex__Zero_); 618 M1b = simd_and(M1,strct_Lex__Digit1_9_); 619 advance_with_carry(M1a, carry12, M2a); 620 advance_with_carry(M1b, carry13, M2b); 621 adc128(M2b, strct_Lex__Digit0_9_, carry14, Temp24); 622 M3b = simd_andc(Temp24,strct_Lex__Digit0_9_); 623 M4 = simd_or(M2a,M3b); 624 M4a = simd_andc(M4,strct_Lex__DecimalPoint_); 625 M4b = simd_and(M4,strct_Lex__DecimalPoint_); 626 advance_with_carry(M4b, carry15, M5b_0); 627 E5b = simd_andc(M5b_0,strct_Lex__Digit0_9_); 628 M5b = simd_andc(M5b_0,E5b); 629 adc128(M5b, strct_Lex__Digit0_9_, carry16, Temp25); 630 M6 = simd_andc(Temp25,strct_Lex__Digit0_9_); 631 M7 = simd_or(M4a,M6); 632 M7a = simd_andc(M7,strct_Lex__Ee_); 633 M7b = simd_and(M7,strct_Lex__Ee_); 634 advance_with_carry(M7b, carry17, M8b); 635 Temp26 = simd_and(strct_Lex__PlusMinus_,M8b); 636 adc128(M8b, Temp26, carry18, Temp27); 637 M9b_10 = simd_andc(Temp27,Temp26); 638 E9b = simd_andc(M9b_10,strct_Lex__Digit0_9_); 639 M9b = simd_andc(M9b_10,E9b); 640 adc128(M9b, strct_Lex__Digit0_9_, carry19, Temp28); 641 M10b = simd_andc(Temp28,strct_Lex__Digit0_9_); 642 M11 = simd_or(M7a,M10b); 643 Temp29 = simd_or(E1,E5b); 644 NumberErrors = simd_or(Temp29,E9b); 645 advance_with_carry(TrueStarts, carry20, Scope1_15); 646 advance_with_carry(Scope1_15, carry21, Scope2_13); 647 advance_with_carry(Scope2_13, carry22, Scope3_6); 648 TrueErrors_4 = simd_andc(Scope1_15,temp66); 649 Temp30 = simd_andc(Scope2_13,strct_Lex__u_); 650 TrueErrors_5 = simd_or(TrueErrors_4,Temp30); 651 Temp31 = simd_andc(Scope3_6,temp50); 652 TrueErrors = simd_or(TrueErrors_5,Temp31); 653 advance_with_carry(Scope3_6, carry23, Follows_8); 654 sbb128(Follows_8, TrueStarts, carry_brw0, TrueSpans); 655 advance_with_carry(FalseStarts, carry24, Scope1_16); 656 advance_with_carry(Scope1_16, carry25, Scope2_14); 657 advance_with_carry(Scope2_14, carry26, Scope3_7); 658 advance_with_carry(Scope3_7, carry27, Scope4); 659 FalseErrors_1 = simd_andc(Scope1_16,strct_Lex__a_); 660 Temp32 = simd_andc(Scope2_14,strct_Lex__l_); 661 FalseErrors_2 = simd_or(FalseErrors_1,Temp32); 662 Temp33 = simd_andc(Scope3_7,strct_Lex__s_); 663 FalseErrors_3 = simd_or(FalseErrors_2,Temp33); 664 Temp34 = simd_andc(Scope4,temp50); 665 FalseErrors = simd_or(FalseErrors_3,Temp34); 666 advance_with_carry(Scope4, carry28, Follows_9); 667 sbb128(Follows_9, FalseStarts, carry_brw1, FalseSpans); 668 advance_with_carry(NullStarts, carry29, Scope1); 669 advance_with_carry(Scope1, carry30, Scope2); 670 advance_with_carry(Scope2, carry31, Scope3); 671 Temp35 = simd_andc(Scope1,strct_Lex__u_); 672 NullErrors_11 = simd_or(NullErrors,Temp35); 673 Temp36 = simd_andc(Scope2,strct_Lex__l_); 674 NullErrors_12 = simd_or(NullErrors_11,Temp36); 675 Temp37 = simd_andc(Scope3,strct_Lex__l_); 676 NullErrors = simd_or(NullErrors_12,Temp37); 677 advance_with_carry(Scope3, carry32, Follows); 678 sbb128(Follows, NullStarts, carry_brw2, NullSpans); 679 Temp38 = simd_or(StringSpans,NumberSpans); 680 Temp39 = simd_or(Temp38,TrueSpans); 681 Temp40 = simd_or(Temp39,FalseSpans); 682 AtomsSpans = simd_or(Temp40,NullSpans); 683 Temp41 = simd_or(StringErrors,NumberErrors); 684 Temp42 = simd_or(Temp41,TrueErrors); 685 Temp43 = simd_or(Temp42,FalseErrors); 686 error_mask = simd_or(Temp43,NullErrors); 687 515 688 516 689 #ifdef DEBUG … … 533 706 print_simd_register("FalseStarts", FalseStarts); 534 707 print_simd_register("NullStarts", NullStarts); 708 print_simd_register("AtomSpans", AtomSpans); 535 709 536 710 #endif 537 711 538 712 if (bitblock_has_bit(error_mask)){ 539 err_pos = src_pos + buf_pos + count_forward_zeroes(error_mask) ;540 fprintf(stderr, "Error at position %i \n.", err_pos);713 err_pos = src_pos + buf_pos + count_forward_zeroes(error_mask) + 1; 714 fprintf(stderr, "Error at position %i.\n", err_pos); 541 715 exit(1); 542 716 } … … 730 904 advance_with_carry(ParityMask, carry3, Temp8); 731 905 StringMask = simd_and(ParityMask,Temp8); 732 StringSpans _6= simd_or(StringMask,UnescapedDQuotes);906 StringSpans = simd_or(StringMask,UnescapedDQuotes); 733 907 Temp9 = simd_or(strct_Lex__True_,strct_Lex__False_); 734 908 Temp10 = simd_or(Temp9,strct_Lex__Null_); 735 909 Temp11 = simd_or(Temp10,strct_Lex__Number_); 736 AtomSpans = simd_or(Temp11,StringSpans _6);910 AtomSpans = simd_or(Temp11,StringSpans); 737 911 advance_with_carry(AtomSpans, carry4, Temp12); 738 912 AtomStarts = simd_andc(AtomSpans,Temp12); … … 742 916 FalseStarts = simd_and(AtomStarts,temp62); 743 917 NullStarts = simd_and(AtomStarts,temp64); 744 745 918 StringEscapeChars = simd_and(Escape,StringMask); 746 StringErrors_ 0= simd_andc(StringEscapeChars,strct_Lex__Escape_);919 StringErrors_17 = simd_andc(StringEscapeChars,strct_Lex__Escape_); 747 920 u = simd_and(StringEscapeChars,strct_Lex__u_); 748 921 advance_with_carry(u, carry5, uScope1); … … 751 924 advance_with_carry(uScope3, carry8, uScope4); 752 925 Temp13 = simd_andc(uScope1,strct_Lex__HexDigit_); 753 StringErrors_1 = simd_or(StringErrors_0,Temp13);926 StringErrors_18 = simd_or(StringErrors_17,Temp13); 754 927 Temp14 = simd_andc(uScope2,strct_Lex__HexDigit_); 755 StringErrors_ 2 = simd_or(StringErrors_1,Temp14);928 StringErrors_19 = simd_or(StringErrors_18,Temp14); 756 929 Temp15 = simd_andc(uScope3,strct_Lex__HexDigit_); 757 StringErrors_ 3 = simd_or(StringErrors_2,Temp15);930 StringErrors_20 = simd_or(StringErrors_19,Temp15); 758 931 Temp16 = simd_andc(uScope4,strct_Lex__HexDigit_); 759 StringErrors_ 4 = simd_or(StringErrors_3,Temp16);932 StringErrors_21 = simd_or(StringErrors_20,Temp16); 760 933 Temp17 = simd_or(Escape,strct_Lex__RSolidus_); 761 934 StringNotEscapedChars = simd_andc(StringMask,Temp17); 762 935 Temp18 = simd_and(StringNotEscapedChars,strct_Ctrl__x00_x1F_); 763 StringErrors_ 5 = simd_or(StringErrors_4,Temp18);936 StringErrors_22 = simd_or(StringErrors_21,Temp18); 764 937 advance_with_carry(StringStarts, carry9, StringCursor); 765 938 adc128(StringCursor, StringMask, carry10, Temp19); 766 939 StringEnds = simd_andc(Temp19,StringMask); 767 940 Temp20 = simd_andc(StringEnds,UnescapedDQuotes); 768 StringErrors = simd_or(StringErrors_5,Temp20); 769 sbb128(StringEnds, StringStarts, carry_brw0, Temp21); 770 StringSpans = simd_or(Temp21,StringEnds); 771 error_mask = StringErrors; 941 StringErrors = simd_or(StringErrors_22,Temp20); 942 M0 = NumberStarts; 943 Temp21 = simd_and(strct_Lex__Minus_,NumberStarts); 944 adc128(NumberStarts, Temp21, carry11, Temp22); 945 M1_23 = simd_andc(Temp22,Temp21); 946 Temp23 = simd_or(strct_Lex__Zero_,strct_Lex__Digit1_9_); 947 E1 = simd_andc(M1_23,Temp23); 948 M1 = simd_andc(M1_23,E1); 949 M1a = simd_and(M1,strct_Lex__Zero_); 950 M1b = simd_and(M1,strct_Lex__Digit1_9_); 951 advance_with_carry(M1a, carry12, M2a); 952 advance_with_carry(M1b, carry13, M2b); 953 adc128(M2b, strct_Lex__Digit0_9_, carry14, Temp24); 954 M3b = simd_andc(Temp24,strct_Lex__Digit0_9_); 955 M4 = simd_or(M2a,M3b); 956 M4a = simd_andc(M4,strct_Lex__DecimalPoint_); 957 M4b = simd_and(M4,strct_Lex__DecimalPoint_); 958 advance_with_carry(M4b, carry15, M5b_0); 959 E5b = simd_andc(M5b_0,strct_Lex__Digit0_9_); 960 M5b = simd_andc(M5b_0,E5b); 961 adc128(M5b, strct_Lex__Digit0_9_, carry16, Temp25); 962 M6 = simd_andc(Temp25,strct_Lex__Digit0_9_); 963 M7 = simd_or(M4a,M6); 964 M7a = simd_andc(M7,strct_Lex__Ee_); 965 M7b = simd_and(M7,strct_Lex__Ee_); 966 advance_with_carry(M7b, carry17, M8b); 967 Temp26 = simd_and(strct_Lex__PlusMinus_,M8b); 968 adc128(M8b, Temp26, carry18, Temp27); 969 M9b_10 = simd_andc(Temp27,Temp26); 970 E9b = simd_andc(M9b_10,strct_Lex__Digit0_9_); 971 M9b = simd_andc(M9b_10,E9b); 972 adc128(M9b, strct_Lex__Digit0_9_, carry19, Temp28); 973 M10b = simd_andc(Temp28,strct_Lex__Digit0_9_); 974 M11 = simd_or(M7a,M10b); 975 Temp29 = simd_or(E1,E5b); 976 NumberErrors = simd_or(Temp29,E9b); 977 advance_with_carry(TrueStarts, carry20, Scope1_15); 978 advance_with_carry(Scope1_15, carry21, Scope2_13); 979 advance_with_carry(Scope2_13, carry22, Scope3_6); 980 TrueErrors_4 = simd_andc(Scope1_15,temp66); 981 Temp30 = simd_andc(Scope2_13,strct_Lex__u_); 982 TrueErrors_5 = simd_or(TrueErrors_4,Temp30); 983 Temp31 = simd_andc(Scope3_6,temp50); 984 TrueErrors = simd_or(TrueErrors_5,Temp31); 985 advance_with_carry(Scope3_6, carry23, Follows_8); 986 sbb128(Follows_8, TrueStarts, carry_brw0, TrueSpans); 987 advance_with_carry(FalseStarts, carry24, Scope1_16); 988 advance_with_carry(Scope1_16, carry25, Scope2_14); 989 advance_with_carry(Scope2_14, carry26, Scope3_7); 990 advance_with_carry(Scope3_7, carry27, Scope4); 991 FalseErrors_1 = simd_andc(Scope1_16,strct_Lex__a_); 992 Temp32 = simd_andc(Scope2_14,strct_Lex__l_); 993 FalseErrors_2 = simd_or(FalseErrors_1,Temp32); 994 Temp33 = simd_andc(Scope3_7,strct_Lex__s_); 995 FalseErrors_3 = simd_or(FalseErrors_2,Temp33); 996 Temp34 = simd_andc(Scope4,temp50); 997 FalseErrors = simd_or(FalseErrors_3,Temp34); 998 advance_with_carry(Scope4, carry28, Follows_9); 999 sbb128(Follows_9, FalseStarts, carry_brw1, FalseSpans); 1000 advance_with_carry(NullStarts, carry29, Scope1); 1001 advance_with_carry(Scope1, carry30, Scope2); 1002 advance_with_carry(Scope2, carry31, Scope3); 1003 Temp35 = simd_andc(Scope1,strct_Lex__u_); 1004 NullErrors_11 = simd_or(NullErrors,Temp35); 1005 Temp36 = simd_andc(Scope2,strct_Lex__l_); 1006 NullErrors_12 = simd_or(NullErrors_11,Temp36); 1007 Temp37 = simd_andc(Scope3,strct_Lex__l_); 1008 NullErrors = simd_or(NullErrors_12,Temp37); 1009 advance_with_carry(Scope3, carry32, Follows); 1010 sbb128(Follows, NullStarts, carry_brw2, NullSpans); 1011 Temp38 = simd_or(StringSpans,NumberSpans); 1012 Temp39 = simd_or(Temp38,TrueSpans); 1013 Temp40 = simd_or(Temp39,FalseSpans); 1014 AtomsSpans = simd_or(Temp40,NullSpans); 1015 Temp41 = simd_or(StringErrors,NumberErrors); 1016 Temp42 = simd_or(Temp41,TrueErrors); 1017 Temp43 = simd_or(Temp42,FalseErrors); 1018 error_mask = simd_or(Temp43,NullErrors); 772 1019 773 1020 #ifdef DEBUG … … 790 1037 print_simd_register("FalseStarts", FalseStarts); 791 1038 print_simd_register("NullStarts", NullStarts); 792 793 print_simd_register("u", u); 794 print_simd_register("StringErrors", StringErrors); 795 1039 print_simd_register("AtomSpans", AtomSpans); 1040 796 1041 #endif 797 1042 798 1043 if(bitblock_has_bit(error_mask)) { 799 err_pos = src_pos + buf_pos + count_forward_zeroes(error_mask) ;800 fprintf(stderr, "Error at position %i \n.", err_pos);1044 err_pos = src_pos + buf_pos + count_forward_zeroes(error_mask) + 1; 1045 fprintf(stderr, "Error at position %i.\n", err_pos); 801 1046 exit(1); 802 1047 }
Note: See TracChangeset
for help on using the changeset viewer.