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

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

Powered by Google App Engine
This is Rietveld 408576698