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

Side by Side Diff: src/x64/stub-cache-x64.cc

Issue 9959050: Fix fast API call for MinGW-w64 (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 8 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 | « src/x64/macro-assembler-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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 __ Move(rcx, api_call_info); 470 __ Move(rcx, api_call_info);
471 __ movq(rbx, FieldOperand(rcx, CallHandlerInfo::kDataOffset)); 471 __ movq(rbx, FieldOperand(rcx, CallHandlerInfo::kDataOffset));
472 __ movq(Operand(rsp, 3 * kPointerSize), rbx); 472 __ movq(Operand(rsp, 3 * kPointerSize), rbx);
473 } else { 473 } else {
474 __ Move(Operand(rsp, 3 * kPointerSize), call_data); 474 __ Move(Operand(rsp, 3 * kPointerSize), call_data);
475 } 475 }
476 476
477 // Prepare arguments. 477 // Prepare arguments.
478 __ lea(rbx, Operand(rsp, 3 * kPointerSize)); 478 __ lea(rbx, Operand(rsp, 3 * kPointerSize));
479 479
480 #ifdef _WIN64 480 #if defined(__MINGW64__)
481 Register arguments_arg = rcx;
482 #elif defined(_WIN64)
481 // Win64 uses first register--rcx--for returned value. 483 // Win64 uses first register--rcx--for returned value.
482 Register arguments_arg = rdx; 484 Register arguments_arg = rdx;
483 #else 485 #else
484 Register arguments_arg = rdi; 486 Register arguments_arg = rdi;
485 #endif 487 #endif
486 488
487 // Allocate the v8::Arguments structure in the arguments' space since 489 // Allocate the v8::Arguments structure in the arguments' space since
488 // it's not controlled by GC. 490 // it's not controlled by GC.
489 const int kApiStackSpace = 4; 491 const int kApiStackSpace = 4;
490 492
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
1000 if (heap()->InNewSpace(callback->data())) { 1002 if (heap()->InNewSpace(callback->data())) {
1001 __ Move(scratch1, callback); 1003 __ Move(scratch1, callback);
1002 __ push(FieldOperand(scratch1, AccessorInfo::kDataOffset)); // data 1004 __ push(FieldOperand(scratch1, AccessorInfo::kDataOffset)); // data
1003 } else { 1005 } else {
1004 __ Push(Handle<Object>(callback->data())); 1006 __ Push(Handle<Object>(callback->data()));
1005 } 1007 }
1006 __ push(name_reg); // name 1008 __ push(name_reg); // name
1007 // Save a pointer to where we pushed the arguments pointer. 1009 // Save a pointer to where we pushed the arguments pointer.
1008 // This will be passed as the const AccessorInfo& to the C++ callback. 1010 // This will be passed as the const AccessorInfo& to the C++ callback.
1009 1011
1010 #ifdef _WIN64 1012 #if defined(__MINGW64__)
1013 Register accessor_info_arg = rdx;
1014 Register name_arg = rcx;
1015 #elif defined(_WIN64)
1011 // Win64 uses first register--rcx--for returned value. 1016 // Win64 uses first register--rcx--for returned value.
1012 Register accessor_info_arg = r8; 1017 Register accessor_info_arg = r8;
1013 Register name_arg = rdx; 1018 Register name_arg = rdx;
1014 #else 1019 #else
1015 Register accessor_info_arg = rsi; 1020 Register accessor_info_arg = rsi;
1016 Register name_arg = rdi; 1021 Register name_arg = rdi;
1017 #endif 1022 #endif
1018 1023
1019 ASSERT(!name_arg.is(scratch2)); 1024 ASSERT(!name_arg.is(scratch2));
1020 __ movq(name_arg, rsp); 1025 __ movq(name_arg, rsp);
(...skipping 2765 matching lines...) Expand 10 before | Expand all | Expand 10 after
3786 __ jmp(ic_slow, RelocInfo::CODE_TARGET); 3791 __ jmp(ic_slow, RelocInfo::CODE_TARGET);
3787 } 3792 }
3788 } 3793 }
3789 3794
3790 3795
3791 #undef __ 3796 #undef __
3792 3797
3793 } } // namespace v8::internal 3798 } } // namespace v8::internal
3794 3799
3795 #endif // V8_TARGET_ARCH_X64 3800 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/macro-assembler-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698