| 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 2816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2827 // Call C function. | 2827 // Call C function. |
| 2828 #ifdef _WIN64 | 2828 #ifdef _WIN64 |
| 2829 // Windows 64-bit ABI passes arguments in rcx, rdx, r8, r9. | 2829 // Windows 64-bit ABI passes arguments in rcx, rdx, r8, r9. |
| 2830 // Pass argv and argc as two parameters. The arguments object will | 2830 // Pass argv and argc as two parameters. The arguments object will |
| 2831 // be created by stubs declared by DECLARE_RUNTIME_FUNCTION(). | 2831 // be created by stubs declared by DECLARE_RUNTIME_FUNCTION(). |
| 2832 if (result_size_ < 2) { | 2832 if (result_size_ < 2) { |
| 2833 // Pass a pointer to the Arguments object as the first argument. | 2833 // Pass a pointer to the Arguments object as the first argument. |
| 2834 // Return result in single register (rax). | 2834 // Return result in single register (rax). |
| 2835 __ movq(rcx, r14); // argc. | 2835 __ movq(rcx, r14); // argc. |
| 2836 __ movq(rdx, r15); // argv. | 2836 __ movq(rdx, r15); // argv. |
| 2837 __ movq(r8, ExternalReference::isolate_address(masm->isolate())); | 2837 __ Move(r8, ExternalReference::isolate_address(masm->isolate())); |
| 2838 } else { | 2838 } else { |
| 2839 ASSERT_EQ(2, result_size_); | 2839 ASSERT_EQ(2, result_size_); |
| 2840 // Pass a pointer to the result location as the first argument. | 2840 // Pass a pointer to the result location as the first argument. |
| 2841 __ lea(rcx, StackSpaceOperand(2)); | 2841 __ lea(rcx, StackSpaceOperand(2)); |
| 2842 // Pass a pointer to the Arguments object as the second argument. | 2842 // Pass a pointer to the Arguments object as the second argument. |
| 2843 __ movq(rdx, r14); // argc. | 2843 __ movq(rdx, r14); // argc. |
| 2844 __ movq(r8, r15); // argv. | 2844 __ movq(r8, r15); // argv. |
| 2845 __ movq(r9, ExternalReference::isolate_address(masm->isolate())); | 2845 __ Move(r9, ExternalReference::isolate_address(masm->isolate())); |
| 2846 } | 2846 } |
| 2847 | 2847 |
| 2848 #else // _WIN64 | 2848 #else // _WIN64 |
| 2849 // GCC passes arguments in rdi, rsi, rdx, rcx, r8, r9. | 2849 // GCC passes arguments in rdi, rsi, rdx, rcx, r8, r9. |
| 2850 __ movq(rdi, r14); // argc. | 2850 __ movq(rdi, r14); // argc. |
| 2851 __ movq(rsi, r15); // argv. | 2851 __ movq(rsi, r15); // argv. |
| 2852 __ Move(rdx, ExternalReference::isolate_address(masm->isolate())); | 2852 __ Move(rdx, ExternalReference::isolate_address(masm->isolate())); |
| 2853 #endif | 2853 #endif |
| 2854 __ call(rbx); | 2854 __ call(rbx); |
| 2855 // Result is in rax - do not destroy this register! | 2855 // Result is in rax - do not destroy this register! |
| (...skipping 2959 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5815 __ bind(&fast_elements_case); | 5815 __ bind(&fast_elements_case); |
| 5816 GenerateCase(masm, FAST_ELEMENTS); | 5816 GenerateCase(masm, FAST_ELEMENTS); |
| 5817 } | 5817 } |
| 5818 | 5818 |
| 5819 | 5819 |
| 5820 #undef __ | 5820 #undef __ |
| 5821 | 5821 |
| 5822 } } // namespace v8::internal | 5822 } } // namespace v8::internal |
| 5823 | 5823 |
| 5824 #endif // V8_TARGET_ARCH_X64 | 5824 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |