OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 6844 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6855 // Result is in rax - do not destroy this register! | 6855 // Result is in rax - do not destroy this register! |
6856 | 6856 |
6857 if (always_allocate_scope) { | 6857 if (always_allocate_scope) { |
6858 __ movq(kScratchRegister, scope_depth); | 6858 __ movq(kScratchRegister, scope_depth); |
6859 __ decl(Operand(kScratchRegister, 0)); | 6859 __ decl(Operand(kScratchRegister, 0)); |
6860 } | 6860 } |
6861 | 6861 |
6862 // Check for failure result. | 6862 // Check for failure result. |
6863 Label failure_returned; | 6863 Label failure_returned; |
6864 ASSERT(((kFailureTag + 1) & kFailureTagMask) == 0); | 6864 ASSERT(((kFailureTag + 1) & kFailureTagMask) == 0); |
| 6865 #ifdef _WIN64 |
| 6866 // If return value is on the stack, pop it to registers. |
| 6867 if (result_size_ > 1) { |
| 6868 ASSERT_EQ(2, result_size_); |
| 6869 // Position above 4 argument mirrors and arguments object. |
| 6870 __ movq(rax, Operand(rsp, 6 * kPointerSize)); |
| 6871 __ movq(rdx, Operand(rsp, 7 * kPointerSize)); |
| 6872 } |
| 6873 #endif |
6865 __ lea(rcx, Operand(rax, 1)); | 6874 __ lea(rcx, Operand(rax, 1)); |
6866 // Lower 2 bits of rcx are 0 iff rax has failure tag. | 6875 // Lower 2 bits of rcx are 0 iff rax has failure tag. |
6867 __ testl(rcx, Immediate(kFailureTagMask)); | 6876 __ testl(rcx, Immediate(kFailureTagMask)); |
6868 __ j(zero, &failure_returned); | 6877 __ j(zero, &failure_returned); |
6869 | 6878 |
6870 // Exit the JavaScript to C++ exit frame. | 6879 // Exit the JavaScript to C++ exit frame. |
6871 __ LeaveExitFrame(frame_type, result_size_); | 6880 __ LeaveExitFrame(frame_type, result_size_); |
6872 __ ret(0); | 6881 __ ret(0); |
6873 | 6882 |
6874 // Handling of failure. | 6883 // Handling of failure. |
(...skipping 857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7732 masm.GetCode(&desc); | 7741 masm.GetCode(&desc); |
7733 // Call the function from C++. | 7742 // Call the function from C++. |
7734 return FUNCTION_CAST<ModuloFunction>(buffer); | 7743 return FUNCTION_CAST<ModuloFunction>(buffer); |
7735 } | 7744 } |
7736 | 7745 |
7737 #endif | 7746 #endif |
7738 | 7747 |
7739 #undef __ | 7748 #undef __ |
7740 | 7749 |
7741 } } // namespace v8::internal | 7750 } } // namespace v8::internal |
OLD | NEW |