| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 424 __ lea(rax, Operand(rsi, rdi, times_1, 0)); | 424 __ lea(rax, Operand(rsi, rdi, times_1, 0)); |
| 425 // Compute and set byte_offset1 (start of capture). | 425 // Compute and set byte_offset1 (start of capture). |
| 426 __ lea(rdi, Operand(rsi, rdx, times_1, 0)); | 426 __ lea(rdi, Operand(rsi, rdx, times_1, 0)); |
| 427 // Set byte_offset2. | 427 // Set byte_offset2. |
| 428 __ movq(rsi, rax); | 428 __ movq(rsi, rax); |
| 429 // Set byte_length. | 429 // Set byte_length. |
| 430 __ movq(rdx, rbx); | 430 __ movq(rdx, rbx); |
| 431 // Isolate. | 431 // Isolate. |
| 432 __ LoadAddress(rcx, ExternalReference::isolate_address()); | 432 __ LoadAddress(rcx, ExternalReference::isolate_address()); |
| 433 #endif | 433 #endif |
| 434 ExternalReference compare = | 434 |
| 435 ExternalReference::re_case_insensitive_compare_uc16(masm_.isolate()); | 435 { // NOLINT: Can't find a way to open this scope without confusing the |
| 436 __ CallCFunction(compare, num_arguments); | 436 // linter. |
| 437 AllowExternalCallThatCantCauseGC scope(&masm_); |
| 438 ExternalReference compare = |
| 439 ExternalReference::re_case_insensitive_compare_uc16(masm_.isolate()); |
| 440 __ CallCFunction(compare, num_arguments); |
| 441 } |
| 437 | 442 |
| 438 // Restore original values before reacting on result value. | 443 // Restore original values before reacting on result value. |
| 439 __ Move(code_object_pointer(), masm_.CodeObject()); | 444 __ Move(code_object_pointer(), masm_.CodeObject()); |
| 440 __ pop(backtrack_stackpointer()); | 445 __ pop(backtrack_stackpointer()); |
| 441 #ifndef _WIN64 | 446 #ifndef _WIN64 |
| 442 __ pop(rdi); | 447 __ pop(rdi); |
| 443 __ pop(rsi); | 448 __ pop(rsi); |
| 444 #endif | 449 #endif |
| 445 | 450 |
| 446 // Check if function returned non-zero for success or zero for failure. | 451 // Check if function returned non-zero for success or zero for failure. |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 699 __ Set(rax, 0); | 704 __ Set(rax, 0); |
| 700 __ jmp(&exit_label_); | 705 __ jmp(&exit_label_); |
| 701 } | 706 } |
| 702 | 707 |
| 703 | 708 |
| 704 Handle<HeapObject> RegExpMacroAssemblerX64::GetCode(Handle<String> source) { | 709 Handle<HeapObject> RegExpMacroAssemblerX64::GetCode(Handle<String> source) { |
| 705 // Finalize code - write the entry point code now we know how many | 710 // Finalize code - write the entry point code now we know how many |
| 706 // registers we need. | 711 // registers we need. |
| 707 // Entry code: | 712 // Entry code: |
| 708 __ bind(&entry_label_); | 713 __ bind(&entry_label_); |
| 709 // Start new stack frame. | 714 |
| 715 // Tell the system that we have a stack frame. Because the type is MANUAL, no |
| 716 // is generated. |
| 717 FrameScope scope(&masm_, StackFrame::MANUAL); |
| 718 |
| 719 // Actually emit code to start a new stack frame. |
| 710 __ push(rbp); | 720 __ push(rbp); |
| 711 __ movq(rbp, rsp); | 721 __ movq(rbp, rsp); |
| 712 // Save parameters and callee-save registers. Order here should correspond | 722 // Save parameters and callee-save registers. Order here should correspond |
| 713 // to order of kBackup_ebx etc. | 723 // to order of kBackup_ebx etc. |
| 714 #ifdef _WIN64 | 724 #ifdef _WIN64 |
| 715 // MSVC passes arguments in rcx, rdx, r8, r9, with backing stack slots. | 725 // MSVC passes arguments in rcx, rdx, r8, r9, with backing stack slots. |
| 716 // Store register parameters in pre-allocated stack slots, | 726 // Store register parameters in pre-allocated stack slots, |
| 717 __ movq(Operand(rbp, kInputString), rcx); | 727 __ movq(Operand(rbp, kInputString), rcx); |
| 718 __ movq(Operand(rbp, kStartIndex), rdx); // Passed as int32 in edx. | 728 __ movq(Operand(rbp, kStartIndex), rdx); // Passed as int32 in edx. |
| 719 __ movq(Operand(rbp, kInputStart), r8); | 729 __ movq(Operand(rbp, kInputStart), r8); |
| (...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1401 } | 1411 } |
| 1402 } | 1412 } |
| 1403 | 1413 |
| 1404 #undef __ | 1414 #undef __ |
| 1405 | 1415 |
| 1406 #endif // V8_INTERPRETED_REGEXP | 1416 #endif // V8_INTERPRETED_REGEXP |
| 1407 | 1417 |
| 1408 }} // namespace v8::internal | 1418 }} // namespace v8::internal |
| 1409 | 1419 |
| 1410 #endif // V8_TARGET_ARCH_X64 | 1420 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |