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

Side by Side Diff: src/x64/code-stubs-x64.cc

Issue 6366010: X64 Crankshaft: Added a bunch of operations. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge/build-x64
Patch Set: Address review comments. Created 9 years, 10 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/assembler-x64-inl.h ('k') | src/x64/disasm-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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 2848 matching lines...) Expand 10 before | Expand all | Expand 10 after
2859 __ movq(rax, Operand(rsp, 6 * kPointerSize)); 2859 __ movq(rax, Operand(rsp, 6 * kPointerSize));
2860 __ movq(rdx, Operand(rsp, 7 * kPointerSize)); 2860 __ movq(rdx, Operand(rsp, 7 * kPointerSize));
2861 } 2861 }
2862 #endif 2862 #endif
2863 __ lea(rcx, Operand(rax, 1)); 2863 __ lea(rcx, Operand(rax, 1));
2864 // Lower 2 bits of rcx are 0 iff rax has failure tag. 2864 // Lower 2 bits of rcx are 0 iff rax has failure tag.
2865 __ testl(rcx, Immediate(kFailureTagMask)); 2865 __ testl(rcx, Immediate(kFailureTagMask));
2866 __ j(zero, &failure_returned); 2866 __ j(zero, &failure_returned);
2867 2867
2868 // Exit the JavaScript to C++ exit frame. 2868 // Exit the JavaScript to C++ exit frame.
2869 __ LeaveExitFrame(); 2869 __ LeaveExitFrame(save_doubles_);
2870 __ ret(0); 2870 __ ret(0);
2871 2871
2872 // Handling of failure. 2872 // Handling of failure.
2873 __ bind(&failure_returned); 2873 __ bind(&failure_returned);
2874 2874
2875 NearLabel retry; 2875 NearLabel retry;
2876 // If the returned exception is RETRY_AFTER_GC continue at retry label 2876 // If the returned exception is RETRY_AFTER_GC continue at retry label
2877 STATIC_ASSERT(Failure::RETRY_AFTER_GC == 0); 2877 STATIC_ASSERT(Failure::RETRY_AFTER_GC == 0);
2878 __ testl(rax, Immediate(((1 << kFailureTypeTagSize) - 1) << kFailureTagSize)); 2878 __ testl(rax, Immediate(((1 << kFailureTypeTagSize) - 1) << kFailureTagSize));
2879 __ j(zero, &retry); 2879 __ j(zero, &retry);
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
2968 // instead of a proper result. The builtin entry handles 2968 // instead of a proper result. The builtin entry handles
2969 // this by performing a garbage collection and retrying the 2969 // this by performing a garbage collection and retrying the
2970 // builtin once. 2970 // builtin once.
2971 2971
2972 // Enter the exit frame that transitions from JavaScript to C++. 2972 // Enter the exit frame that transitions from JavaScript to C++.
2973 #ifdef _WIN64 2973 #ifdef _WIN64
2974 int arg_stack_space = (result_size_ < 2 ? 2 : 4); 2974 int arg_stack_space = (result_size_ < 2 ? 2 : 4);
2975 #else 2975 #else
2976 int arg_stack_space = 0; 2976 int arg_stack_space = 0;
2977 #endif 2977 #endif
2978 __ EnterExitFrame(arg_stack_space); 2978 __ EnterExitFrame(arg_stack_space, save_doubles_);
2979 2979
2980 // rax: Holds the context at this point, but should not be used. 2980 // rax: Holds the context at this point, but should not be used.
2981 // On entry to code generated by GenerateCore, it must hold 2981 // On entry to code generated by GenerateCore, it must hold
2982 // a failure result if the collect_garbage argument to GenerateCore 2982 // a failure result if the collect_garbage argument to GenerateCore
2983 // is true. This failure result can be the result of code 2983 // is true. This failure result can be the result of code
2984 // generated by a previous call to GenerateCore. The value 2984 // generated by a previous call to GenerateCore. The value
2985 // of rax is then passed to Runtime::PerformGC. 2985 // of rax is then passed to Runtime::PerformGC.
2986 // rbx: pointer to builtin function (C callee-saved). 2986 // rbx: pointer to builtin function (C callee-saved).
2987 // rbp: frame pointer of exit frame (restored after C call). 2987 // rbp: frame pointer of exit frame (restored after C call).
2988 // rsp: stack pointer (restored after C call). 2988 // rsp: stack pointer (restored after C call).
(...skipping 1400 matching lines...) Expand 10 before | Expand all | Expand 10 after
4389 4389
4390 // Do a tail call to the rewritten stub. 4390 // Do a tail call to the rewritten stub.
4391 __ jmp(rdi); 4391 __ jmp(rdi);
4392 } 4392 }
4393 4393
4394 #undef __ 4394 #undef __
4395 4395
4396 } } // namespace v8::internal 4396 } } // namespace v8::internal
4397 4397
4398 #endif // V8_TARGET_ARCH_X64 4398 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/assembler-x64-inl.h ('k') | src/x64/disasm-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698