OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 // Mismatch, try case-insensitive match (converting letters to lower-case). | 356 // Mismatch, try case-insensitive match (converting letters to lower-case). |
357 __ Orr(w10, w10, 0x20); // Convert capture character to lower-case. | 357 __ Orr(w10, w10, 0x20); // Convert capture character to lower-case. |
358 __ Orr(w11, w11, 0x20); // Also convert input character. | 358 __ Orr(w11, w11, 0x20); // Also convert input character. |
359 __ Cmp(w11, w10); | 359 __ Cmp(w11, w10); |
360 __ B(ne, &fail); | 360 __ B(ne, &fail); |
361 __ Sub(w10, w10, 'a'); | 361 __ Sub(w10, w10, 'a'); |
362 __ Cmp(w10, 'z' - 'a'); // Is w10 a lowercase letter? | 362 __ Cmp(w10, 'z' - 'a'); // Is w10 a lowercase letter? |
363 __ B(ls, &loop_check); // In range 'a'-'z'. | 363 __ B(ls, &loop_check); // In range 'a'-'z'. |
364 // Latin-1: Check for values in range [224,254] but not 247. | 364 // Latin-1: Check for values in range [224,254] but not 247. |
365 __ Sub(w10, w10, 224 - 'a'); | 365 __ Sub(w10, w10, 224 - 'a'); |
366 // TODO(jbramley): Use Ccmp here. | |
367 __ Cmp(w10, 254 - 224); | 366 __ Cmp(w10, 254 - 224); |
368 __ B(hi, &fail); // Weren't Latin-1 letters. | 367 __ Ccmp(w10, 247 - 224, ZFlag, ls); // Check for 247. |
369 __ Cmp(w10, 247 - 224); // Check for 247. | 368 __ B(eq, &fail); // Weren't Latin-1 letters. |
370 __ B(eq, &fail); | |
371 | 369 |
372 __ Bind(&loop_check); | 370 __ Bind(&loop_check); |
373 __ Cmp(capture_start_address, capture_end_addresss); | 371 __ Cmp(capture_start_address, capture_end_addresss); |
374 __ B(lt, &loop); | 372 __ B(lt, &loop); |
375 __ B(&success); | 373 __ B(&success); |
376 | 374 |
377 __ Bind(&fail); | 375 __ Bind(&fail); |
378 BranchOrBacktrack(al, on_no_match); | 376 BranchOrBacktrack(al, on_no_match); |
379 | 377 |
380 __ Bind(&success); | 378 __ Bind(&success); |
(...skipping 1340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1721 __ Ldrh(current_character(), MemOperand(input_end(), offset, SXTW)); | 1719 __ Ldrh(current_character(), MemOperand(input_end(), offset, SXTW)); |
1722 } | 1720 } |
1723 } | 1721 } |
1724 } | 1722 } |
1725 | 1723 |
1726 #endif // V8_INTERPRETED_REGEXP | 1724 #endif // V8_INTERPRETED_REGEXP |
1727 | 1725 |
1728 }} // namespace v8::internal | 1726 }} // namespace v8::internal |
1729 | 1727 |
1730 #endif // V8_TARGET_ARCH_A64 | 1728 #endif // V8_TARGET_ARCH_A64 |
OLD | NEW |