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

Side by Side Diff: src/compiler/gap-resolver.h

Issue 2082263002: [turbofan]: Support using push instructions for setting up tail call parameters (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Review feedback Created 4 years, 5 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
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_COMPILER_GAP_RESOLVER_H_ 5 #ifndef V8_COMPILER_GAP_RESOLVER_H_
6 #define V8_COMPILER_GAP_RESOLVER_H_ 6 #define V8_COMPILER_GAP_RESOLVER_H_
7 7
8 #include "src/compiler/instruction.h" 8 #include "src/compiler/instruction.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 13 matching lines...) Expand all
24 // Assemble swap. 24 // Assemble swap.
25 virtual void AssembleSwap(InstructionOperand* source, 25 virtual void AssembleSwap(InstructionOperand* source,
26 InstructionOperand* destination) = 0; 26 InstructionOperand* destination) = 0;
27 }; 27 };
28 28
29 explicit GapResolver(Assembler* assembler) : assembler_(assembler) {} 29 explicit GapResolver(Assembler* assembler) : assembler_(assembler) {}
30 30
31 // Resolve a set of parallel moves, emitting assembler instructions. 31 // Resolve a set of parallel moves, emitting assembler instructions.
32 void Resolve(ParallelMove* parallel_move) const; 32 void Resolve(ParallelMove* parallel_move) const;
33 33
34 enum PushTypeFlag {
35 kImmediatePush = 0x1,
36 kScalarPush = 0x2,
37 kFloat32Push = 0x4,
38 kFloat64Push = 0x8,
39 kFloatPush = kFloat32Push | kFloat64Push
40 };
41
42 typedef base::Flags<PushTypeFlag> PushTypeFlags;
43
44 // Generate a list moves from an instruction that are candidates to be turned
45 // into push instructions on platforms that support them.
46 static void GetPushCompatibleMoves(Zone* zone, Instruction* instr,
Mircea Trofin 2016/06/30 15:32:34 Is this just for tail calls cases, or in general?
danno 2016/07/01 07:31:57 Eventually, I'd like to convert the "normal" call
47 PushTypeFlags push_type,
48 ZoneVector<MoveOperands*>* pushes);
49
34 private: 50 private:
35 // Perform the given move, possibly requiring other moves to satisfy 51 // Perform the given move, possibly requiring other moves to satisfy
36 // dependencies. 52 // dependencies.
37 void PerformMove(ParallelMove* moves, MoveOperands* move) const; 53 void PerformMove(ParallelMove* moves, MoveOperands* move) const;
38 54
39 // Assembler used to emit moves and save registers. 55 // Assembler used to emit moves and save registers.
40 Assembler* const assembler_; 56 Assembler* const assembler_;
41 }; 57 };
42 58
43 } // namespace compiler 59 } // namespace compiler
44 } // namespace internal 60 } // namespace internal
45 } // namespace v8 61 } // namespace v8
46 62
47 #endif // V8_COMPILER_GAP_RESOLVER_H_ 63 #endif // V8_COMPILER_GAP_RESOLVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698