| 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 2638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2649 __ bind(&setup_two_byte); | 2649 __ bind(&setup_two_byte); |
| 2650 __ SmiToInteger32(rcx, FieldOperand(rdi, String::kLengthOffset)); | 2650 __ SmiToInteger32(rcx, FieldOperand(rdi, String::kLengthOffset)); |
| 2651 __ lea(arg4, FieldOperand(rdi, rcx, times_2, SeqTwoByteString::kHeaderSize)); | 2651 __ lea(arg4, FieldOperand(rdi, rcx, times_2, SeqTwoByteString::kHeaderSize)); |
| 2652 __ lea(arg3, FieldOperand(rdi, rbx, times_2, SeqTwoByteString::kHeaderSize)); | 2652 __ lea(arg3, FieldOperand(rdi, rbx, times_2, SeqTwoByteString::kHeaderSize)); |
| 2653 | 2653 |
| 2654 __ bind(&setup_rest); | 2654 __ bind(&setup_rest); |
| 2655 // Argument 2: Previous index. | 2655 // Argument 2: Previous index. |
| 2656 __ movq(arg2, rbx); | 2656 __ movq(arg2, rbx); |
| 2657 | 2657 |
| 2658 // Argument 1: Subject string. | 2658 // Argument 1: Subject string. |
| 2659 #ifdef WIN64_ | 2659 #ifdef _WIN64 |
| 2660 __ movq(arg1, rdi); | 2660 __ movq(arg1, rdi); |
| 2661 #else | 2661 #else |
| 2662 // Already there in AMD64 calling convention. | 2662 // Already there in AMD64 calling convention. |
| 2663 ASSERT(arg1.is(rdi)); | 2663 ASSERT(arg1.is(rdi)); |
| 2664 #endif | 2664 #endif |
| 2665 | 2665 |
| 2666 // Locate the code entry and call it. | 2666 // Locate the code entry and call it. |
| 2667 __ addq(r11, Immediate(Code::kHeaderSize - kHeapObjectTag)); | 2667 __ addq(r11, Immediate(Code::kHeaderSize - kHeapObjectTag)); |
| 2668 __ call(r11); | 2668 __ call(r11); |
| 2669 | 2669 |
| (...skipping 901 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3571 // TODO(X64): On Win64, if we ever use XMM6-XMM15, the low low 64 bits are | 3571 // TODO(X64): On Win64, if we ever use XMM6-XMM15, the low low 64 bits are |
| 3572 // callee save as well. | 3572 // callee save as well. |
| 3573 | 3573 |
| 3574 // Save copies of the top frame descriptor on the stack. | 3574 // Save copies of the top frame descriptor on the stack. |
| 3575 ExternalReference c_entry_fp(Isolate::k_c_entry_fp_address); | 3575 ExternalReference c_entry_fp(Isolate::k_c_entry_fp_address); |
| 3576 __ load_rax(c_entry_fp); | 3576 __ load_rax(c_entry_fp); |
| 3577 __ push(rax); | 3577 __ push(rax); |
| 3578 | 3578 |
| 3579 // Set up the roots and smi constant registers. | 3579 // Set up the roots and smi constant registers. |
| 3580 // Needs to be done before any further smi loads. | 3580 // Needs to be done before any further smi loads. |
| 3581 ExternalReference roots_address = ExternalReference::roots_address(); | 3581 __ InitializeRootRegister(); |
| 3582 __ movq(kRootRegister, roots_address); | |
| 3583 __ InitializeSmiConstantRegister(); | 3582 __ InitializeSmiConstantRegister(); |
| 3584 | 3583 |
| 3585 #ifdef ENABLE_LOGGING_AND_PROFILING | 3584 #ifdef ENABLE_LOGGING_AND_PROFILING |
| 3586 // If this is the outermost JS call, set js_entry_sp value. | 3585 // If this is the outermost JS call, set js_entry_sp value. |
| 3587 ExternalReference js_entry_sp(Isolate::k_js_entry_sp_address); | 3586 ExternalReference js_entry_sp(Isolate::k_js_entry_sp_address); |
| 3588 __ load_rax(js_entry_sp); | 3587 __ load_rax(js_entry_sp); |
| 3589 __ testq(rax, rax); | 3588 __ testq(rax, rax); |
| 3590 __ j(not_zero, ¬_outermost_js); | 3589 __ j(not_zero, ¬_outermost_js); |
| 3591 __ movq(rax, rbp); | 3590 __ movq(rax, rbp); |
| 3592 __ store_rax(js_entry_sp); | 3591 __ store_rax(js_entry_sp); |
| (...skipping 1566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5159 FieldOperand(elements, PixelArray::kExternalPointerOffset)); | 5158 FieldOperand(elements, PixelArray::kExternalPointerOffset)); |
| 5160 __ movb(Operand(external_pointer, untagged_key, times_1, 0), untagged_value); | 5159 __ movb(Operand(external_pointer, untagged_key, times_1, 0), untagged_value); |
| 5161 __ ret(0); // Return value in eax. | 5160 __ ret(0); // Return value in eax. |
| 5162 } | 5161 } |
| 5163 | 5162 |
| 5164 #undef __ | 5163 #undef __ |
| 5165 | 5164 |
| 5166 } } // namespace v8::internal | 5165 } } // namespace v8::internal |
| 5167 | 5166 |
| 5168 #endif // V8_TARGET_ARCH_X64 | 5167 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |