OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
445 void RegExpMacroAssemblerARM::CheckNotCharacter(unsigned c, | 445 void RegExpMacroAssemblerARM::CheckNotCharacter(unsigned c, |
446 Label* on_not_equal) { | 446 Label* on_not_equal) { |
447 __ cmp(current_character(), Operand(c)); | 447 __ cmp(current_character(), Operand(c)); |
448 BranchOrBacktrack(ne, on_not_equal); | 448 BranchOrBacktrack(ne, on_not_equal); |
449 } | 449 } |
450 | 450 |
451 | 451 |
452 void RegExpMacroAssemblerARM::CheckCharacterAfterAnd(uint32_t c, | 452 void RegExpMacroAssemblerARM::CheckCharacterAfterAnd(uint32_t c, |
453 uint32_t mask, | 453 uint32_t mask, |
454 Label* on_equal) { | 454 Label* on_equal) { |
455 __ and_(r0, current_character(), Operand(mask)); | 455 if (c == 0) { |
456 __ cmp(r0, Operand(c)); | 456 __ tst(current_character(), Operand(mask)); |
| 457 } else { |
| 458 __ and_(r0, current_character(), Operand(mask)); |
| 459 __ cmp(r0, Operand(c)); |
| 460 } |
457 BranchOrBacktrack(eq, on_equal); | 461 BranchOrBacktrack(eq, on_equal); |
458 } | 462 } |
459 | 463 |
460 | 464 |
461 void RegExpMacroAssemblerARM::CheckNotCharacterAfterAnd(unsigned c, | 465 void RegExpMacroAssemblerARM::CheckNotCharacterAfterAnd(unsigned c, |
462 unsigned mask, | 466 unsigned mask, |
463 Label* on_not_equal) { | 467 Label* on_not_equal) { |
464 __ and_(r0, current_character(), Operand(mask)); | 468 if (c == 0) { |
465 __ cmp(r0, Operand(c)); | 469 __ tst(current_character(), Operand(mask)); |
| 470 } else { |
| 471 __ and_(r0, current_character(), Operand(mask)); |
| 472 __ cmp(r0, Operand(c)); |
| 473 } |
466 BranchOrBacktrack(ne, on_not_equal); | 474 BranchOrBacktrack(ne, on_not_equal); |
467 } | 475 } |
468 | 476 |
469 | 477 |
470 void RegExpMacroAssemblerARM::CheckNotCharacterAfterMinusAnd( | 478 void RegExpMacroAssemblerARM::CheckNotCharacterAfterMinusAnd( |
471 uc16 c, | 479 uc16 c, |
472 uc16 minus, | 480 uc16 minus, |
473 uc16 mask, | 481 uc16 mask, |
474 Label* on_not_equal) { | 482 Label* on_not_equal) { |
475 ASSERT(minus < String::kMaxUtf16CodeUnit); | 483 ASSERT(minus < String::kMaxUtf16CodeUnit); |
(...skipping 866 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1342 __ ldr(pc, MemOperand(sp, stack_alignment, PostIndex)); | 1350 __ ldr(pc, MemOperand(sp, stack_alignment, PostIndex)); |
1343 } | 1351 } |
1344 | 1352 |
1345 #undef __ | 1353 #undef __ |
1346 | 1354 |
1347 #endif // V8_INTERPRETED_REGEXP | 1355 #endif // V8_INTERPRETED_REGEXP |
1348 | 1356 |
1349 }} // namespace v8::internal | 1357 }} // namespace v8::internal |
1350 | 1358 |
1351 #endif // V8_TARGET_ARCH_ARM | 1359 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |