| 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 #include "src/compiler/wasm-compiler.h" | 5 #include "src/compiler/wasm-compiler.h" | 
| 6 | 6 | 
| 7 #include "src/isolate-inl.h" | 7 #include "src/isolate-inl.h" | 
| 8 | 8 | 
| 9 #include "src/base/platform/platform.h" | 9 #include "src/base/platform/platform.h" | 
| 10 | 10 | 
| (...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 490     case wasm::kExprI64And: | 490     case wasm::kExprI64And: | 
| 491       op = m->Word64And(); | 491       op = m->Word64And(); | 
| 492       break; | 492       break; | 
| 493     // todo(ahaas): I added a list of missing instructions here to make merging | 493     // todo(ahaas): I added a list of missing instructions here to make merging | 
| 494     // easier when I do them one by one. | 494     // easier when I do them one by one. | 
| 495     // kExprI64Add: | 495     // kExprI64Add: | 
| 496     case wasm::kExprI64Add: | 496     case wasm::kExprI64Add: | 
| 497       op = m->Int64Add(); | 497       op = m->Int64Add(); | 
| 498       break; | 498       break; | 
| 499     // kExprI64Sub: | 499     // kExprI64Sub: | 
|  | 500     case wasm::kExprI64Sub: | 
|  | 501       op = m->Int64Sub(); | 
|  | 502       break; | 
| 500     // kExprI64Mul: | 503     // kExprI64Mul: | 
| 501     // kExprI64DivS: | 504     // kExprI64DivS: | 
| 502     // kExprI64DivU: | 505     // kExprI64DivU: | 
| 503     // kExprI64RemS: | 506     // kExprI64RemS: | 
| 504     // kExprI64RemU: | 507     // kExprI64RemU: | 
| 505     case wasm::kExprI64Ior: | 508     case wasm::kExprI64Ior: | 
| 506       op = m->Word64Or(); | 509       op = m->Word64Or(); | 
| 507       break; | 510       break; | 
| 508 // kExprI64Xor: | 511 // kExprI64Xor: | 
| 509     case wasm::kExprI64Xor: | 512     case wasm::kExprI64Xor: | 
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 554       std::swap(left, right); | 557       std::swap(left, right); | 
| 555       break; | 558       break; | 
| 556     case wasm::kExprI64GeU: | 559     case wasm::kExprI64GeU: | 
| 557       op = m->Uint64LessThanOrEqual(); | 560       op = m->Uint64LessThanOrEqual(); | 
| 558       std::swap(left, right); | 561       std::swap(left, right); | 
| 559       break; | 562       break; | 
| 560 | 563 | 
| 561 #if WASM_64 | 564 #if WASM_64 | 
| 562     // Opcodes only supported on 64-bit platforms. | 565     // Opcodes only supported on 64-bit platforms. | 
| 563     // TODO(titzer): query the machine operator builder here instead of #ifdef. | 566     // TODO(titzer): query the machine operator builder here instead of #ifdef. | 
| 564     case wasm::kExprI64Sub: |  | 
| 565       op = m->Int64Sub(); |  | 
| 566       break; |  | 
| 567     case wasm::kExprI64Mul: | 567     case wasm::kExprI64Mul: | 
| 568       op = m->Int64Mul(); | 568       op = m->Int64Mul(); | 
| 569       break; | 569       break; | 
| 570     case wasm::kExprI64DivS: { | 570     case wasm::kExprI64DivS: { | 
| 571       trap_->ZeroCheck64(kTrapDivByZero, right); | 571       trap_->ZeroCheck64(kTrapDivByZero, right); | 
| 572       Node* before = *control_; | 572       Node* before = *control_; | 
| 573       Node* denom_is_m1; | 573       Node* denom_is_m1; | 
| 574       Node* denom_is_not_m1; | 574       Node* denom_is_not_m1; | 
| 575       Branch(graph()->NewNode(jsgraph()->machine()->Word64Equal(), right, | 575       Branch(graph()->NewNode(jsgraph()->machine()->Word64Equal(), right, | 
| 576                               jsgraph()->Int64Constant(-1)), | 576                               jsgraph()->Int64Constant(-1)), | 
| (...skipping 1902 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2479                                   function.name_offset, function.name_length)); | 2479                                   function.name_offset, function.name_length)); | 
| 2480   } | 2480   } | 
| 2481 | 2481 | 
| 2482   return code; | 2482   return code; | 
| 2483 } | 2483 } | 
| 2484 | 2484 | 
| 2485 | 2485 | 
| 2486 }  // namespace compiler | 2486 }  // namespace compiler | 
| 2487 }  // namespace internal | 2487 }  // namespace internal | 
| 2488 }  // namespace v8 | 2488 }  // namespace v8 | 
| OLD | NEW | 
|---|