OLD | NEW |
1 // Copyright 2006-2010 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2010 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 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 __ Addu(a0, a0, Operand(end_of_input_address())); | 370 __ Addu(a0, a0, Operand(end_of_input_address())); |
371 // Length of capture. | 371 // Length of capture. |
372 __ mov(a2, a1); | 372 __ mov(a2, a1); |
373 // Save length in callee-save register for use on return. | 373 // Save length in callee-save register for use on return. |
374 __ mov(s3, a1); | 374 __ mov(s3, a1); |
375 // Address of current input position. | 375 // Address of current input position. |
376 __ Addu(a1, current_input_offset(), Operand(end_of_input_address())); | 376 __ Addu(a1, current_input_offset(), Operand(end_of_input_address())); |
377 // Isolate. | 377 // Isolate. |
378 __ li(a3, Operand(ExternalReference::isolate_address())); | 378 __ li(a3, Operand(ExternalReference::isolate_address())); |
379 | 379 |
380 ExternalReference function = | 380 { |
381 ExternalReference::re_case_insensitive_compare_uc16(masm_->isolate()); | 381 AllowExternalCallThatCantCauseGC scope(masm_); |
382 __ CallCFunction(function, argument_count); | 382 ExternalReference function = |
| 383 ExternalReference::re_case_insensitive_compare_uc16(masm_->isolate()); |
| 384 __ CallCFunction(function, argument_count); |
| 385 } |
383 | 386 |
384 // Restore regexp engine registers. | 387 // Restore regexp engine registers. |
385 __ MultiPop(regexp_registers_to_retain); | 388 __ MultiPop(regexp_registers_to_retain); |
386 __ li(code_pointer(), Operand(masm_->CodeObject())); | 389 __ li(code_pointer(), Operand(masm_->CodeObject())); |
387 __ lw(end_of_input_address(), MemOperand(frame_pointer(), kInputEnd)); | 390 __ lw(end_of_input_address(), MemOperand(frame_pointer(), kInputEnd)); |
388 | 391 |
389 // Check if function returned non-zero for success or zero for failure. | 392 // Check if function returned non-zero for success or zero for failure. |
390 BranchOrBacktrack(on_no_match, eq, v0, Operand(zero_reg)); | 393 BranchOrBacktrack(on_no_match, eq, v0, Operand(zero_reg)); |
391 // On success, increment position by length of capture. | 394 // On success, increment position by length of capture. |
392 __ Addu(current_input_offset(), current_input_offset(), Operand(s3)); | 395 __ Addu(current_input_offset(), current_input_offset(), Operand(s3)); |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
600 // If the code gets corrupted due to long regular expressions and lack of | 603 // If the code gets corrupted due to long regular expressions and lack of |
601 // space on trampolines, an internal exception flag is set. If this case | 604 // space on trampolines, an internal exception flag is set. If this case |
602 // is detected, we will jump into exit sequence right away. | 605 // is detected, we will jump into exit sequence right away. |
603 __ bind_to(&entry_label_, internal_failure_label_.pos()); | 606 __ bind_to(&entry_label_, internal_failure_label_.pos()); |
604 } else { | 607 } else { |
605 // Finalize code - write the entry point code now we know how many | 608 // Finalize code - write the entry point code now we know how many |
606 // registers we need. | 609 // registers we need. |
607 | 610 |
608 // Entry code: | 611 // Entry code: |
609 __ bind(&entry_label_); | 612 __ bind(&entry_label_); |
| 613 |
| 614 // Tell the system that we have a stack frame. Because the type is MANUAL, |
| 615 // no is generated. |
| 616 FrameScope scope(masm_, StackFrame::MANUAL); |
| 617 |
| 618 // Actually emit code to start a new stack frame. |
610 // Push arguments | 619 // Push arguments |
611 // Save callee-save registers. | 620 // Save callee-save registers. |
612 // Start new stack frame. | 621 // Start new stack frame. |
613 // Store link register in existing stack-cell. | 622 // Store link register in existing stack-cell. |
614 // Order here should correspond to order of offset constants in header file. | 623 // Order here should correspond to order of offset constants in header file. |
615 RegList registers_to_retain = s0.bit() | s1.bit() | s2.bit() | | 624 RegList registers_to_retain = s0.bit() | s1.bit() | s2.bit() | |
616 s3.bit() | s4.bit() | s5.bit() | s6.bit() | s7.bit() | fp.bit(); | 625 s3.bit() | s4.bit() | s5.bit() | s6.bit() | s7.bit() | fp.bit(); |
617 RegList argument_registers = a0.bit() | a1.bit() | a2.bit() | a3.bit(); | 626 RegList argument_registers = a0.bit() | a1.bit() | a2.bit() | a3.bit(); |
618 __ MultiPush(argument_registers | registers_to_retain | ra.bit()); | 627 __ MultiPush(argument_registers | registers_to_retain | ra.bit()); |
619 // Set frame pointer in space for it if this is not a direct call | 628 // Set frame pointer in space for it if this is not a direct call |
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1255 } | 1264 } |
1256 | 1265 |
1257 | 1266 |
1258 #undef __ | 1267 #undef __ |
1259 | 1268 |
1260 #endif // V8_INTERPRETED_REGEXP | 1269 #endif // V8_INTERPRETED_REGEXP |
1261 | 1270 |
1262 }} // namespace v8::internal | 1271 }} // namespace v8::internal |
1263 | 1272 |
1264 #endif // V8_TARGET_ARCH_MIPS | 1273 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |