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 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
486 case wasm::kExprI32GeU: | 486 case wasm::kExprI32GeU: |
487 op = m->Uint32LessThanOrEqual(); | 487 op = m->Uint32LessThanOrEqual(); |
488 std::swap(left, right); | 488 std::swap(left, right); |
489 break; | 489 break; |
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: |
| 497 op = m->Int64Add(); |
| 498 break; |
496 // kExprI64Sub: | 499 // kExprI64Sub: |
497 // kExprI64Mul: | 500 // kExprI64Mul: |
498 // kExprI64DivS: | 501 // kExprI64DivS: |
499 // kExprI64DivU: | 502 // kExprI64DivU: |
500 // kExprI64RemS: | 503 // kExprI64RemS: |
501 // kExprI64RemU: | 504 // kExprI64RemU: |
502 case wasm::kExprI64Ior: | 505 case wasm::kExprI64Ior: |
503 op = m->Word64Or(); | 506 op = m->Word64Or(); |
504 break; | 507 break; |
505 // kExprI64Xor: | 508 // kExprI64Xor: |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
551 std::swap(left, right); | 554 std::swap(left, right); |
552 break; | 555 break; |
553 case wasm::kExprI64GeU: | 556 case wasm::kExprI64GeU: |
554 op = m->Uint64LessThanOrEqual(); | 557 op = m->Uint64LessThanOrEqual(); |
555 std::swap(left, right); | 558 std::swap(left, right); |
556 break; | 559 break; |
557 | 560 |
558 #if WASM_64 | 561 #if WASM_64 |
559 // Opcodes only supported on 64-bit platforms. | 562 // Opcodes only supported on 64-bit platforms. |
560 // TODO(titzer): query the machine operator builder here instead of #ifdef. | 563 // TODO(titzer): query the machine operator builder here instead of #ifdef. |
561 case wasm::kExprI64Add: | |
562 op = m->Int64Add(); | |
563 break; | |
564 case wasm::kExprI64Sub: | 564 case wasm::kExprI64Sub: |
565 op = m->Int64Sub(); | 565 op = m->Int64Sub(); |
566 break; | 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; |
(...skipping 1905 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 |