OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_MACHINE_OPERATOR_H_ | 5 #ifndef V8_COMPILER_MACHINE_OPERATOR_H_ |
6 #define V8_COMPILER_MACHINE_OPERATOR_H_ | 6 #define V8_COMPILER_MACHINE_OPERATOR_H_ |
7 | 7 |
8 #include "src/compiler/machine-type.h" | 8 #include "src/compiler/machine-type.h" |
9 #include "src/compiler/opcodes.h" | 9 #include "src/compiler/opcodes.h" |
10 #include "src/compiler/operator.h" | 10 #include "src/compiler/operator.h" |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 // integers. | 127 // integers. |
128 Operator* ChangeInt32ToFloat64() { UNOP(ChangeInt32ToFloat64); } | 128 Operator* ChangeInt32ToFloat64() { UNOP(ChangeInt32ToFloat64); } |
129 Operator* ChangeUint32ToFloat64() { UNOP(ChangeUint32ToFloat64); } | 129 Operator* ChangeUint32ToFloat64() { UNOP(ChangeUint32ToFloat64); } |
130 Operator* ChangeFloat64ToInt32() { UNOP(ChangeFloat64ToInt32); } | 130 Operator* ChangeFloat64ToInt32() { UNOP(ChangeFloat64ToInt32); } |
131 Operator* ChangeFloat64ToUint32() { UNOP(ChangeFloat64ToUint32); } | 131 Operator* ChangeFloat64ToUint32() { UNOP(ChangeFloat64ToUint32); } |
132 | 132 |
133 // Sign/zero extend int32/uint32 to int64/uint64. | 133 // Sign/zero extend int32/uint32 to int64/uint64. |
134 Operator* ChangeInt32ToInt64() { UNOP(ChangeInt32ToInt64); } | 134 Operator* ChangeInt32ToInt64() { UNOP(ChangeInt32ToInt64); } |
135 Operator* ChangeUint32ToUint64() { UNOP(ChangeUint32ToUint64); } | 135 Operator* ChangeUint32ToUint64() { UNOP(ChangeUint32ToUint64); } |
136 | 136 |
| 137 // Truncate double to int32 using JavaScript semantics. |
| 138 Operator* TruncateFloat64ToInt32() { UNOP(TruncateFloat64ToInt32); } |
| 139 |
137 // Truncate the high order bits and convert the remaining bits to int32. | 140 // Truncate the high order bits and convert the remaining bits to int32. |
138 Operator* TruncateInt64ToInt32() { UNOP(TruncateInt64ToInt32); } | 141 Operator* TruncateInt64ToInt32() { UNOP(TruncateInt64ToInt32); } |
139 | 142 |
140 // Floating point operators always operate with IEEE 754 round-to-nearest. | 143 // Floating point operators always operate with IEEE 754 round-to-nearest. |
141 Operator* Float64Add() { BINOP_C(Float64Add); } | 144 Operator* Float64Add() { BINOP_C(Float64Add); } |
142 Operator* Float64Sub() { BINOP(Float64Sub); } | 145 Operator* Float64Sub() { BINOP(Float64Sub); } |
143 Operator* Float64Mul() { BINOP_C(Float64Mul); } | 146 Operator* Float64Mul() { BINOP_C(Float64Mul); } |
144 Operator* Float64Div() { BINOP(Float64Div); } | 147 Operator* Float64Div() { BINOP(Float64Div); } |
145 Operator* Float64Mod() { BINOP(Float64Mod); } | 148 Operator* Float64Mod() { BINOP(Float64Mod); } |
146 | 149 |
(...skipping 18 matching lines...) Expand all Loading... |
165 | 168 |
166 private: | 169 private: |
167 Zone* zone_; | 170 Zone* zone_; |
168 MachineType word_; | 171 MachineType word_; |
169 }; | 172 }; |
170 } | 173 } |
171 } | 174 } |
172 } // namespace v8::internal::compiler | 175 } // namespace v8::internal::compiler |
173 | 176 |
174 #endif // V8_COMPILER_MACHINE_OPERATOR_H_ | 177 #endif // V8_COMPILER_MACHINE_OPERATOR_H_ |
OLD | NEW |