Chromium Code Reviews| 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 #include "src/compiler/int64-lowering.h" | 5 #include "src/compiler/int64-lowering.h" |
| 6 #include "src/compiler/common-operator.h" | 6 #include "src/compiler/common-operator.h" |
| 7 #include "src/compiler/graph.h" | 7 #include "src/compiler/graph.h" |
| 8 #include "src/compiler/linkage.h" | 8 #include "src/compiler/linkage.h" |
| 9 #include "src/compiler/machine-operator.h" | 9 #include "src/compiler/machine-operator.h" |
| 10 #include "src/compiler/node-properties.h" | 10 #include "src/compiler/node-properties.h" |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 286 graph()->NewNode(machine()->Word32Xor(), GetReplacementHigh(left), | 286 graph()->NewNode(machine()->Word32Xor(), GetReplacementHigh(left), |
| 287 GetReplacementHigh(right)); | 287 GetReplacementHigh(right)); |
| 288 ReplaceNode(node, low_node, high_node); | 288 ReplaceNode(node, low_node, high_node); |
| 289 break; | 289 break; |
| 290 } | 290 } |
| 291 | 291 |
| 292 // kExprI64Shl: | 292 // kExprI64Shl: |
| 293 // kExprI64ShrU: | 293 // kExprI64ShrU: |
| 294 // kExprI64ShrS: | 294 // kExprI64ShrS: |
| 295 // kExprI64Eq: | 295 // kExprI64Eq: |
| 296 case IrOpcode::kWord64Equal: { | |
| 297 DCHECK(node->InputCount() == 2); | |
| 298 Node* left = node->InputAt(0); | |
| 299 Node* right = node->InputAt(1); | |
| 300 | |
| 301 Node* replacement = graph()->NewNode( | |
|
titzer
2016/02/23 15:49:30
Can you add a
TODO(wasm): Use explicit compariso
| |
| 302 machine()->Word32Equal(), | |
| 303 graph()->NewNode( | |
| 304 machine()->Word32Or(), | |
| 305 graph()->NewNode(machine()->Word32Xor(), GetReplacementLow(left), | |
| 306 GetReplacementLow(right)), | |
| 307 graph()->NewNode(machine()->Word32Xor(), GetReplacementHigh(left), | |
| 308 GetReplacementHigh(right))), | |
| 309 graph()->NewNode(common()->Int32Constant(0))); | |
| 310 | |
| 311 ReplaceNode(node, replacement, nullptr); | |
| 312 break; | |
| 313 } | |
| 296 // kExprI64Ne: | 314 // kExprI64Ne: |
| 297 // kExprI64LtS: | 315 // kExprI64LtS: |
| 298 // kExprI64LeS: | 316 // kExprI64LeS: |
| 299 // kExprI64LtU: | 317 // kExprI64LtU: |
| 300 // kExprI64LeU: | 318 // kExprI64LeU: |
| 301 // kExprI64GtS: | 319 // kExprI64GtS: |
| 302 // kExprI64GeS: | 320 // kExprI64GeS: |
| 303 // kExprI64GtU: | 321 // kExprI64GtU: |
| 304 // kExprI64GeU: | 322 // kExprI64GeU: |
| 305 | 323 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 363 } | 381 } |
| 364 | 382 |
| 365 Node* Int64Lowering::GetReplacementHigh(Node* node) { | 383 Node* Int64Lowering::GetReplacementHigh(Node* node) { |
| 366 Node* result = replacements_[node->id()].high; | 384 Node* result = replacements_[node->id()].high; |
| 367 DCHECK(result); | 385 DCHECK(result); |
| 368 return result; | 386 return result; |
| 369 } | 387 } |
| 370 } // namespace compiler | 388 } // namespace compiler |
| 371 } // namespace internal | 389 } // namespace internal |
| 372 } // namespace v8 | 390 } // namespace v8 |
| OLD | NEW |