OLD | NEW |
---|---|
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_INT64_LOWERING_H_ | 5 #ifndef V8_COMPILER_INT64_LOWERING_H_ |
6 #define V8_COMPILER_INT64_LOWERING_H_ | 6 #define V8_COMPILER_INT64_LOWERING_H_ |
7 | 7 |
8 #include "src/compiler/common-operator.h" | 8 #include "src/compiler/common-operator.h" |
9 #include "src/compiler/graph.h" | 9 #include "src/compiler/graph.h" |
10 #include "src/compiler/machine-operator.h" | 10 #include "src/compiler/machine-operator.h" |
11 #include "src/compiler/node-marker.h" | 11 #include "src/compiler/node-marker.h" |
12 #include "src/zone-containers.h" | 12 #include "src/zone-containers.h" |
13 | 13 |
14 namespace v8 { | 14 namespace v8 { |
15 namespace internal { | 15 namespace internal { |
16 namespace compiler { | 16 namespace compiler { |
17 | 17 |
18 class Int64Lowering { | 18 class Int64Lowering { |
19 public: | 19 public: |
20 Int64Lowering(Graph* graph, MachineOperatorBuilder* machine, | 20 Int64Lowering(Graph* graph, MachineOperatorBuilder* machine, |
21 CommonOperatorBuilder* common, Zone* zone, | 21 CommonOperatorBuilder* common, Zone* zone, |
22 Signature<MachineRepresentation>* signature); | 22 Signature<MachineRepresentation>* signature); |
23 | 23 |
24 void LowerGraph(); | 24 void LowerGraph(); |
25 | 25 |
26 static int GetParameterCountAfterLowering( | 26 static int GetParameterCountAfterLowering( |
27 Signature<MachineRepresentation>* signature); | 27 Signature<MachineRepresentation>* signature); |
28 | 28 |
29 static int GetLowerWordOffset() { | |
titzer
2016/06/21 21:22:59
Can you move these into the CC file?
| |
30 #if defined(V8_TARGET_LITTLE_ENDIAN) | |
31 return 0; | |
32 #elif defined(V8_TARGET_BIG_ENDIAN) | |
33 return 4; | |
34 #endif | |
35 } | |
36 | |
37 static int GetHigherWordOffset() { | |
38 #if defined(V8_TARGET_LITTLE_ENDIAN) | |
39 return 4; | |
40 #elif defined(V8_TARGET_BIG_ENDIAN) | |
41 return 0; | |
42 #endif | |
43 } | |
44 | |
29 private: | 45 private: |
30 enum class State : uint8_t { kUnvisited, kOnStack, kVisited }; | 46 enum class State : uint8_t { kUnvisited, kOnStack, kVisited }; |
31 | 47 |
32 struct Replacement { | 48 struct Replacement { |
33 Node* low; | 49 Node* low; |
34 Node* high; | 50 Node* high; |
35 }; | 51 }; |
36 | 52 |
37 Zone* zone() const { return zone_; } | 53 Zone* zone() const { return zone_; } |
38 Graph* graph() const { return graph_; } | 54 Graph* graph() const { return graph_; } |
(...skipping 30 matching lines...) Expand all Loading... | |
69 Replacement* replacements_; | 85 Replacement* replacements_; |
70 Signature<MachineRepresentation>* signature_; | 86 Signature<MachineRepresentation>* signature_; |
71 Node* placeholder_; | 87 Node* placeholder_; |
72 }; | 88 }; |
73 | 89 |
74 } // namespace compiler | 90 } // namespace compiler |
75 } // namespace internal | 91 } // namespace internal |
76 } // namespace v8 | 92 } // namespace v8 |
77 | 93 |
78 #endif // V8_COMPILER_INT64_LOWERING_H_ | 94 #endif // V8_COMPILER_INT64_LOWERING_H_ |
OLD | NEW |