| 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_MACHINE_NODE_FACTORY_H_ | 5 #ifndef V8_COMPILER_MACHINE_NODE_FACTORY_H_ |
| 6 #define V8_COMPILER_MACHINE_NODE_FACTORY_H_ | 6 #define V8_COMPILER_MACHINE_NODE_FACTORY_H_ |
| 7 | 7 |
| 8 #ifdef USE_SIMULATOR | 8 #ifdef USE_SIMULATOR |
| 9 #define MACHINE_ASSEMBLER_SUPPORTS_CALL_C 0 | 9 #define MACHINE_ASSEMBLER_SUPPORTS_CALL_C 0 |
| 10 #else | 10 #else |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 } | 188 } |
| 189 Node* Word64NotEqual(Node* a, Node* b) { | 189 Node* Word64NotEqual(Node* a, Node* b) { |
| 190 return Word64BinaryNot(Word64Equal(a, b)); | 190 return Word64BinaryNot(Word64Equal(a, b)); |
| 191 } | 191 } |
| 192 Node* Word64Not(Node* a) { return Word64Xor(a, Int64Constant(-1)); } | 192 Node* Word64Not(Node* a) { return Word64Xor(a, Int64Constant(-1)); } |
| 193 Node* Word64BinaryNot(Node* a) { return Word64Equal(a, Int64Constant(0)); } | 193 Node* Word64BinaryNot(Node* a) { return Word64Equal(a, Int64Constant(0)); } |
| 194 | 194 |
| 195 Node* Int32Add(Node* a, Node* b) { | 195 Node* Int32Add(Node* a, Node* b) { |
| 196 return NEW_NODE_2(MACHINE()->Int32Add(), a, b); | 196 return NEW_NODE_2(MACHINE()->Int32Add(), a, b); |
| 197 } | 197 } |
| 198 void Int32AddWithOverflow(Node* a, Node* b, Node** val_return, |
| 199 Node** ovf_return) { |
| 200 Node* add = NEW_NODE_2(MACHINE()->Int32AddWithOverflow(), a, b); |
| 201 if (val_return) *val_return = NEW_NODE_1(COMMON()->Projection(0), add); |
| 202 if (ovf_return) *ovf_return = NEW_NODE_1(COMMON()->Projection(1), add); |
| 203 } |
| 198 Node* Int32Sub(Node* a, Node* b) { | 204 Node* Int32Sub(Node* a, Node* b) { |
| 199 return NEW_NODE_2(MACHINE()->Int32Sub(), a, b); | 205 return NEW_NODE_2(MACHINE()->Int32Sub(), a, b); |
| 200 } | 206 } |
| 201 Node* Int32Mul(Node* a, Node* b) { | 207 Node* Int32Mul(Node* a, Node* b) { |
| 202 return NEW_NODE_2(MACHINE()->Int32Mul(), a, b); | 208 return NEW_NODE_2(MACHINE()->Int32Mul(), a, b); |
| 203 } | 209 } |
| 204 Node* Int32Div(Node* a, Node* b) { | 210 Node* Int32Div(Node* a, Node* b) { |
| 205 return NEW_NODE_2(MACHINE()->Int32Div(), a, b); | 211 return NEW_NODE_2(MACHINE()->Int32Div(), a, b); |
| 206 } | 212 } |
| 207 Node* Int32UDiv(Node* a, Node* b) { | 213 Node* Int32UDiv(Node* a, Node* b) { |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 #undef NEW_NODE_3 | 371 #undef NEW_NODE_3 |
| 366 #undef MACHINE | 372 #undef MACHINE |
| 367 #undef COMMON | 373 #undef COMMON |
| 368 #undef ZONE | 374 #undef ZONE |
| 369 | 375 |
| 370 } // namespace compiler | 376 } // namespace compiler |
| 371 } // namespace internal | 377 } // namespace internal |
| 372 } // namespace v8 | 378 } // namespace v8 |
| 373 | 379 |
| 374 #endif // V8_COMPILER_MACHINE_NODE_FACTORY_H_ | 380 #endif // V8_COMPILER_MACHINE_NODE_FACTORY_H_ |
| OLD | NEW |