OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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_CODE_ASSEMBLER_H_ | 5 #ifndef V8_COMPILER_CODE_ASSEMBLER_H_ |
6 #define V8_COMPILER_CODE_ASSEMBLER_H_ | 6 #define V8_COMPILER_CODE_ASSEMBLER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 // Clients of this interface shouldn't depend on lots of compiler internals. | 10 // Clients of this interface shouldn't depend on lots of compiler internals. |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 V(Word64Shr) \ | 101 V(Word64Shr) \ |
102 V(Word64Sar) \ | 102 V(Word64Sar) \ |
103 V(Word64Ror) | 103 V(Word64Ror) |
104 | 104 |
105 #define CODE_ASSEMBLER_UNARY_OP_LIST(V) \ | 105 #define CODE_ASSEMBLER_UNARY_OP_LIST(V) \ |
106 V(Float64Neg) \ | 106 V(Float64Neg) \ |
107 V(Float64Sqrt) \ | 107 V(Float64Sqrt) \ |
108 V(Float64ExtractLowWord32) \ | 108 V(Float64ExtractLowWord32) \ |
109 V(Float64ExtractHighWord32) \ | 109 V(Float64ExtractHighWord32) \ |
110 V(BitcastWordToTagged) \ | 110 V(BitcastWordToTagged) \ |
| 111 V(TruncateFloat64ToWord32) \ |
111 V(TruncateInt64ToInt32) \ | 112 V(TruncateInt64ToInt32) \ |
112 V(ChangeFloat64ToUint32) \ | 113 V(ChangeFloat64ToUint32) \ |
113 V(ChangeInt32ToFloat64) \ | 114 V(ChangeInt32ToFloat64) \ |
114 V(ChangeInt32ToInt64) \ | 115 V(ChangeInt32ToInt64) \ |
115 V(ChangeUint32ToFloat64) \ | 116 V(ChangeUint32ToFloat64) \ |
116 V(ChangeUint32ToUint64) \ | 117 V(ChangeUint32ToUint64) \ |
| 118 V(RoundFloat64ToInt32) \ |
117 V(Float64RoundDown) \ | 119 V(Float64RoundDown) \ |
118 V(Float64RoundUp) \ | 120 V(Float64RoundUp) \ |
119 V(Float64RoundTruncate) \ | 121 V(Float64RoundTruncate) \ |
120 V(Word32Clz) | 122 V(Word32Clz) |
121 | 123 |
122 // A "public" interface used by components outside of compiler directory to | 124 // A "public" interface used by components outside of compiler directory to |
123 // create code objects with TurboFan's backend. This class is mostly a thin shim | 125 // create code objects with TurboFan's backend. This class is mostly a thin shim |
124 // around the RawMachineAssembler, and its primary job is to ensure that the | 126 // around the RawMachineAssembler, and its primary job is to ensure that the |
125 // innards of the RawMachineAssembler and other compiler implementation details | 127 // innards of the RawMachineAssembler and other compiler implementation details |
126 // don't leak outside of the the compiler directory.. | 128 // don't leak outside of the the compiler directory.. |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 CODE_ASSEMBLER_BINARY_OP_LIST(DECLARE_CODE_ASSEMBLER_BINARY_OP) | 236 CODE_ASSEMBLER_BINARY_OP_LIST(DECLARE_CODE_ASSEMBLER_BINARY_OP) |
235 #undef DECLARE_CODE_ASSEMBLER_BINARY_OP | 237 #undef DECLARE_CODE_ASSEMBLER_BINARY_OP |
236 | 238 |
237 Node* WordShl(Node* value, int shift); | 239 Node* WordShl(Node* value, int shift); |
238 | 240 |
239 // Unary | 241 // Unary |
240 #define DECLARE_CODE_ASSEMBLER_UNARY_OP(name) Node* name(Node* a); | 242 #define DECLARE_CODE_ASSEMBLER_UNARY_OP(name) Node* name(Node* a); |
241 CODE_ASSEMBLER_UNARY_OP_LIST(DECLARE_CODE_ASSEMBLER_UNARY_OP) | 243 CODE_ASSEMBLER_UNARY_OP_LIST(DECLARE_CODE_ASSEMBLER_UNARY_OP) |
242 #undef DECLARE_CODE_ASSEMBLER_UNARY_OP | 244 #undef DECLARE_CODE_ASSEMBLER_UNARY_OP |
243 | 245 |
244 Node* TruncateFloat64ToInt32RoundToZero(Node* a); | |
245 Node* TruncateFloat64ToInt32JavaScript(Node* a); | |
246 // No-op on 32-bit, otherwise zero extend. | 246 // No-op on 32-bit, otherwise zero extend. |
247 Node* ChangeUint32ToWord(Node* value); | 247 Node* ChangeUint32ToWord(Node* value); |
248 // No-op on 32-bit, otherwise sign extend. | 248 // No-op on 32-bit, otherwise sign extend. |
249 Node* ChangeInt32ToIntPtr(Node* value); | 249 Node* ChangeInt32ToIntPtr(Node* value); |
250 | 250 |
251 // Projections | 251 // Projections |
252 Node* Projection(int index, Node* value); | 252 Node* Projection(int index, Node* value); |
253 | 253 |
254 // Calls | 254 // Calls |
255 Node* CallRuntime(Runtime::FunctionId function_id, Node* context); | 255 Node* CallRuntime(Runtime::FunctionId function_id, Node* context); |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 // Map of variables to the list of value nodes that have been added from each | 385 // Map of variables to the list of value nodes that have been added from each |
386 // merge path in their order of merging. | 386 // merge path in their order of merging. |
387 std::map<Variable::Impl*, std::vector<Node*>> variable_merges_; | 387 std::map<Variable::Impl*, std::vector<Node*>> variable_merges_; |
388 }; | 388 }; |
389 | 389 |
390 } // namespace compiler | 390 } // namespace compiler |
391 } // namespace internal | 391 } // namespace internal |
392 } // namespace v8 | 392 } // namespace v8 |
393 | 393 |
394 #endif // V8_COMPILER_CODE_ASSEMBLER_H_ | 394 #endif // V8_COMPILER_CODE_ASSEMBLER_H_ |
OLD | NEW |