Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/x64/macro-assembler-x64.cc

Issue 335006: X64/Win64: Fix bug in returning ObjectPair. (Closed)
Patch Set: Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/x64/codegen-x64.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1862 matching lines...) Expand 10 before | Expand all | Expand 10 after
1873 int kOffset = ExitFrameConstants::kDebugMarkOffset - kCallerSavedSize; 1873 int kOffset = ExitFrameConstants::kDebugMarkOffset - kCallerSavedSize;
1874 lea(rbx, Operand(rbp, kOffset)); 1874 lea(rbx, Operand(rbp, kOffset));
1875 CopyRegistersFromStackToMemory(rbx, rcx, kJSCallerSaved); 1875 CopyRegistersFromStackToMemory(rbx, rcx, kJSCallerSaved);
1876 } 1876 }
1877 #endif 1877 #endif
1878 1878
1879 // Get the return address from the stack and restore the frame pointer. 1879 // Get the return address from the stack and restore the frame pointer.
1880 movq(rcx, Operand(rbp, 1 * kPointerSize)); 1880 movq(rcx, Operand(rbp, 1 * kPointerSize));
1881 movq(rbp, Operand(rbp, 0 * kPointerSize)); 1881 movq(rbp, Operand(rbp, 0 * kPointerSize));
1882 1882
1883 #ifdef _WIN64
1884 // If return value is on the stack, pop it to registers.
1885 if (result_size > 1) {
1886 ASSERT_EQ(2, result_size);
1887 // Position above 4 argument mirrors and arguments object.
1888 movq(rax, Operand(rsp, 6 * kPointerSize));
1889 movq(rdx, Operand(rsp, 7 * kPointerSize));
1890 }
1891 #endif
1892
1893 // Pop everything up to and including the arguments and the receiver 1883 // Pop everything up to and including the arguments and the receiver
1894 // from the caller stack. 1884 // from the caller stack.
1895 lea(rsp, Operand(r15, 1 * kPointerSize)); 1885 lea(rsp, Operand(r15, 1 * kPointerSize));
1896 1886
1897 // Restore current context from top and clear it in debug mode. 1887 // Restore current context from top and clear it in debug mode.
1898 ExternalReference context_address(Top::k_context_address); 1888 ExternalReference context_address(Top::k_context_address);
1899 movq(kScratchRegister, context_address); 1889 movq(kScratchRegister, context_address);
1900 movq(rsi, Operand(kScratchRegister, 0)); 1890 movq(rsi, Operand(kScratchRegister, 0));
1901 #ifdef DEBUG 1891 #ifdef DEBUG
1902 movq(Operand(kScratchRegister, 0), Immediate(0)); 1892 movq(Operand(kScratchRegister, 0), Immediate(0));
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
2248 CodePatcher::~CodePatcher() { 2238 CodePatcher::~CodePatcher() {
2249 // Indicate that code has changed. 2239 // Indicate that code has changed.
2250 CPU::FlushICache(address_, size_); 2240 CPU::FlushICache(address_, size_);
2251 2241
2252 // Check that the code was patched as expected. 2242 // Check that the code was patched as expected.
2253 ASSERT(masm_.pc_ == address_ + size_); 2243 ASSERT(masm_.pc_ == address_ + size_);
2254 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); 2244 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap);
2255 } 2245 }
2256 2246
2257 } } // namespace v8::internal 2247 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/x64/codegen-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698