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

Side by Side 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, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/x64/macro-assembler-x64.cc » ('j') | 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 6935 matching lines...) Expand 10 before | Expand all | Expand 10 after
6946 ExternalReference scope_depth = 6946 ExternalReference scope_depth =
6947 ExternalReference::heap_always_allocate_scope_depth(); 6947 ExternalReference::heap_always_allocate_scope_depth();
6948 if (always_allocate_scope) { 6948 if (always_allocate_scope) {
6949 __ movq(kScratchRegister, scope_depth); 6949 __ movq(kScratchRegister, scope_depth);
6950 __ incl(Operand(kScratchRegister, 0)); 6950 __ incl(Operand(kScratchRegister, 0));
6951 } 6951 }
6952 6952
6953 // Call C function. 6953 // Call C function.
6954 #ifdef _WIN64 6954 #ifdef _WIN64
6955 // Windows 64-bit ABI passes arguments in rcx, rdx, r8, r9 6955 // Windows 64-bit ABI passes arguments in rcx, rdx, r8, r9
6956 // Store Arguments object on stack 6956 // Store Arguments object on stack, below the 4 WIN64 ABI parameter slots.
6957 __ movq(Operand(rsp, 1 * kPointerSize), r14); // argc. 6957 __ movq(Operand(rsp, 4 * kPointerSize), r14); // argc.
6958 __ movq(Operand(rsp, 2 * kPointerSize), r15); // argv. 6958 __ movq(Operand(rsp, 5 * kPointerSize), r15); // argv.
6959 // Pass a pointer to the Arguments object as the first argument. 6959 // Pass a pointer to the Arguments object as the first argument.
6960 __ lea(rcx, Operand(rsp, 1 * kPointerSize)); 6960 __ lea(rcx, Operand(rsp, 4 * kPointerSize));
6961 #else // ! defined(_WIN64) 6961 #else // ! defined(_WIN64)
6962 // GCC passes arguments in rdi, rsi, rdx, rcx, r8, r9. 6962 // GCC passes arguments in rdi, rsi, rdx, rcx, r8, r9.
6963 __ movq(rdi, r14); // argc. 6963 __ movq(rdi, r14); // argc.
6964 __ movq(rsi, r15); // argv. 6964 __ movq(rsi, r15); // argv.
6965 #endif 6965 #endif
6966 __ call(rbx); 6966 __ call(rbx);
6967 // Result is in rax - do not destroy this register! 6967 // Result is in rax - do not destroy this register!
6968 6968
6969 if (always_allocate_scope) { 6969 if (always_allocate_scope) {
6970 __ movq(kScratchRegister, scope_depth); 6970 __ movq(kScratchRegister, scope_depth);
(...skipping 893 matching lines...) Expand 10 before | Expand all | Expand 10 after
7864 int CompareStub::MinorKey() { 7864 int CompareStub::MinorKey() {
7865 // Encode the two parameters in a unique 16 bit value. 7865 // Encode the two parameters in a unique 16 bit value.
7866 ASSERT(static_cast<unsigned>(cc_) < (1 << 15)); 7866 ASSERT(static_cast<unsigned>(cc_) < (1 << 15));
7867 return (static_cast<unsigned>(cc_) << 1) | (strict_ ? 1 : 0); 7867 return (static_cast<unsigned>(cc_) << 1) | (strict_ ? 1 : 0);
7868 } 7868 }
7869 7869
7870 7870
7871 #undef __ 7871 #undef __
7872 7872
7873 } } // namespace v8::internal 7873 } } // namespace v8::internal
OLDNEW
« 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