Index: src/x64/codegen-x64.cc |
diff --git a/src/x64/codegen-x64.cc b/src/x64/codegen-x64.cc |
index d36af8c794baff92b507bbcb3cfbb4e9c33a5eaf..a4fd5928e92eee1811069b67014764389f18be2c 100644 |
--- a/src/x64/codegen-x64.cc |
+++ b/src/x64/codegen-x64.cc |
@@ -6862,6 +6862,15 @@ void CEntryStub::GenerateCore(MacroAssembler* masm, |
// Check for failure result. |
Label failure_returned; |
ASSERT(((kFailureTag + 1) & kFailureTagMask) == 0); |
+#ifdef _WIN64 |
+ // If return value is on the stack, pop it to registers. |
+ if (result_size_ > 1) { |
+ ASSERT_EQ(2, result_size_); |
+ // Position above 4 argument mirrors and arguments object. |
+ __ movq(rax, Operand(rsp, 6 * kPointerSize)); |
+ __ movq(rdx, Operand(rsp, 7 * kPointerSize)); |
+ } |
+#endif |
__ lea(rcx, Operand(rax, 1)); |
// Lower 2 bits of rcx are 0 iff rax has failure tag. |
__ testl(rcx, Immediate(kFailureTagMask)); |