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

Side by Side Diff: src/x87/macro-assembler-x87.h

Issue 1767343003: X87: [crankshaft] Support ES6 tail call elimination. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « src/x87/builtins-x87.cc ('k') | src/x87/macro-assembler-x87.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_X87_MACRO_ASSEMBLER_X87_H_ 5 #ifndef V8_X87_MACRO_ASSEMBLER_X87_H_
6 #define V8_X87_MACRO_ASSEMBLER_X87_H_ 6 #define V8_X87_MACRO_ASSEMBLER_X87_H_
7 7
8 #include "src/assembler.h" 8 #include "src/assembler.h"
9 #include "src/bailout-reason.h" 9 #include "src/bailout-reason.h"
10 #include "src/frames.h" 10 #include "src/frames.h"
(...skipping 26 matching lines...) Expand all
37 37
38 enum RememberedSetAction { EMIT_REMEMBERED_SET, OMIT_REMEMBERED_SET }; 38 enum RememberedSetAction { EMIT_REMEMBERED_SET, OMIT_REMEMBERED_SET };
39 enum SmiCheck { INLINE_SMI_CHECK, OMIT_SMI_CHECK }; 39 enum SmiCheck { INLINE_SMI_CHECK, OMIT_SMI_CHECK };
40 enum PointersToHereCheck { 40 enum PointersToHereCheck {
41 kPointersToHereMaybeInteresting, 41 kPointersToHereMaybeInteresting,
42 kPointersToHereAreAlwaysInteresting 42 kPointersToHereAreAlwaysInteresting
43 }; 43 };
44 44
45 enum RegisterValueType { REGISTER_VALUE_IS_SMI, REGISTER_VALUE_IS_INT32 }; 45 enum RegisterValueType { REGISTER_VALUE_IS_SMI, REGISTER_VALUE_IS_INT32 };
46 46
47 enum class ReturnAddressState { kOnStack, kNotOnStack };
48
47 #ifdef DEBUG 49 #ifdef DEBUG
48 bool AreAliased(Register reg1, Register reg2, Register reg3 = no_reg, 50 bool AreAliased(Register reg1, Register reg2, Register reg3 = no_reg,
49 Register reg4 = no_reg, Register reg5 = no_reg, 51 Register reg4 = no_reg, Register reg5 = no_reg,
50 Register reg6 = no_reg, Register reg7 = no_reg, 52 Register reg6 = no_reg, Register reg7 = no_reg,
51 Register reg8 = no_reg); 53 Register reg8 = no_reg);
52 #endif 54 #endif
53 55
54 // MacroAssembler implements a collection of frequently used macros. 56 // MacroAssembler implements a collection of frequently used macros.
55 class MacroAssembler: public Assembler { 57 class MacroAssembler: public Assembler {
56 public: 58 public:
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 } 313 }
312 } 314 }
313 315
314 void CmpWeakValue(Register value, Handle<WeakCell> cell, Register scratch); 316 void CmpWeakValue(Register value, Handle<WeakCell> cell, Register scratch);
315 void GetWeakValue(Register value, Handle<WeakCell> cell); 317 void GetWeakValue(Register value, Handle<WeakCell> cell);
316 void LoadWeakValue(Register value, Handle<WeakCell> cell, Label* miss); 318 void LoadWeakValue(Register value, Handle<WeakCell> cell, Label* miss);
317 319
318 // --------------------------------------------------------------------------- 320 // ---------------------------------------------------------------------------
319 // JavaScript invokes 321 // JavaScript invokes
320 322
323 // Removes current frame and its arguments from the stack preserving
324 // the arguments and a return address pushed to the stack for the next call.
325 // |ra_state| defines whether return address is already pushed to stack or
326 // not. Both |callee_args_count| and |caller_args_count_reg| do not include
327 // receiver. |callee_args_count| is not modified, |caller_args_count_reg|
328 // is trashed.
329 void PrepareForTailCall(const ParameterCount& callee_args_count,
330 Register caller_args_count_reg, Register scratch0,
331 Register scratch1, ReturnAddressState ra_state);
332
321 // Invoke the JavaScript function code by either calling or jumping. 333 // Invoke the JavaScript function code by either calling or jumping.
322 334
323 void InvokeFunctionCode(Register function, Register new_target, 335 void InvokeFunctionCode(Register function, Register new_target,
324 const ParameterCount& expected, 336 const ParameterCount& expected,
325 const ParameterCount& actual, InvokeFlag flag, 337 const ParameterCount& actual, InvokeFlag flag,
326 const CallWrapper& call_wrapper); 338 const CallWrapper& call_wrapper);
327 339
328 void FloodFunctionIfStepping(Register fun, Register new_target, 340 void FloodFunctionIfStepping(Register fun, Register new_target,
329 const ParameterCount& expected, 341 const ParameterCount& expected,
330 const ParameterCount& actual); 342 const ParameterCount& actual);
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 762
751 void Lzcnt(Register dst, Register src) { Lzcnt(dst, Operand(src)); } 763 void Lzcnt(Register dst, Register src) { Lzcnt(dst, Operand(src)); }
752 void Lzcnt(Register dst, const Operand& src); 764 void Lzcnt(Register dst, const Operand& src);
753 765
754 void Tzcnt(Register dst, Register src) { Tzcnt(dst, Operand(src)); } 766 void Tzcnt(Register dst, Register src) { Tzcnt(dst, Operand(src)); }
755 void Tzcnt(Register dst, const Operand& src); 767 void Tzcnt(Register dst, const Operand& src);
756 768
757 void Popcnt(Register dst, Register src) { Popcnt(dst, Operand(src)); } 769 void Popcnt(Register dst, Register src) { Popcnt(dst, Operand(src)); }
758 void Popcnt(Register dst, const Operand& src); 770 void Popcnt(Register dst, const Operand& src);
759 771
760 // Emit call to the code we are currently generating.
761 void CallSelf() {
762 Handle<Code> self(reinterpret_cast<Code**>(CodeObject().location()));
763 call(self, RelocInfo::CODE_TARGET);
764 }
765
766 // Move if the registers are not identical. 772 // Move if the registers are not identical.
767 void Move(Register target, Register source); 773 void Move(Register target, Register source);
768 774
769 // Move a constant into a destination using the most efficient encoding. 775 // Move a constant into a destination using the most efficient encoding.
770 void Move(Register dst, const Immediate& x); 776 void Move(Register dst, const Immediate& x);
771 void Move(const Operand& dst, const Immediate& x); 777 void Move(const Operand& dst, const Immediate& x);
772 778
773 void Move(Register dst, Handle<Object> handle) { LoadObject(dst, handle); } 779 void Move(Register dst, Handle<Object> handle) { LoadObject(dst, handle); }
774 void Move(Register dst, Smi* source) { Move(dst, Immediate(source)); } 780 void Move(Register dst, Smi* source) { Move(dst, Immediate(source)); }
775 781
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
1006 } \ 1012 } \
1007 masm-> 1013 masm->
1008 #else 1014 #else
1009 #define ACCESS_MASM(masm) masm-> 1015 #define ACCESS_MASM(masm) masm->
1010 #endif 1016 #endif
1011 1017
1012 } // namespace internal 1018 } // namespace internal
1013 } // namespace v8 1019 } // namespace v8
1014 1020
1015 #endif // V8_X87_MACRO_ASSEMBLER_X87_H_ 1021 #endif // V8_X87_MACRO_ASSEMBLER_X87_H_
OLDNEW
« no previous file with comments | « src/x87/builtins-x87.cc ('k') | src/x87/macro-assembler-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698