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

Unified Diff: src/x64/codegen-x64.cc

Issue 182027: X64: Obey WIN64 ABI more exactly, in WIN64 build. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 4 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/x64/macro-assembler-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/codegen-x64.cc
===================================================================
--- src/x64/codegen-x64.cc (revision 2789)
+++ src/x64/codegen-x64.cc (working copy)
@@ -6953,11 +6953,11 @@
// Call C function.
#ifdef _WIN64
// Windows 64-bit ABI passes arguments in rcx, rdx, r8, r9
- // Store Arguments object on stack
- __ movq(Operand(rsp, 1 * kPointerSize), r14); // argc.
- __ movq(Operand(rsp, 2 * kPointerSize), r15); // argv.
+ // Store Arguments object on stack, below the 4 WIN64 ABI parameter slots.
+ __ movq(Operand(rsp, 4 * kPointerSize), r14); // argc.
+ __ movq(Operand(rsp, 5 * kPointerSize), r15); // argv.
// Pass a pointer to the Arguments object as the first argument.
- __ lea(rcx, Operand(rsp, 1 * kPointerSize));
+ __ lea(rcx, Operand(rsp, 4 * kPointerSize));
#else // ! defined(_WIN64)
// GCC passes arguments in rdi, rsi, rdx, rcx, r8, r9.
__ movq(rdi, r14); // argc.
« no previous file with comments | « no previous file | src/x64/macro-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698