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 // kExprI64And: | 505 // kExprI64And: |
503 // kExprI64Ior: | 506 // kExprI64Ior: |
504 case wasm::kExprI64Ior: | 507 case wasm::kExprI64Ior: |
505 op = m->Word64Or(); | 508 op = m->Word64Or(); |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
547 std::swap(left, right); | 550 std::swap(left, right); |
548 break; | 551 break; |
549 case wasm::kExprI64GeU: | 552 case wasm::kExprI64GeU: |
550 op = m->Uint64LessThanOrEqual(); | 553 op = m->Uint64LessThanOrEqual(); |
551 std::swap(left, right); | 554 std::swap(left, right); |
552 break; | 555 break; |
553 | 556 |
554 #if WASM_64 | 557 #if WASM_64 |
555 // Opcodes only supported on 64-bit platforms. | 558 // Opcodes only supported on 64-bit platforms. |
556 // TODO(titzer): query the machine operator builder here instead of #ifdef. | 559 // TODO(titzer): query the machine operator builder here instead of #ifdef. |
557 case wasm::kExprI64Add: | |
558 op = m->Int64Add(); | |
559 break; | |
560 case wasm::kExprI64Sub: | 560 case wasm::kExprI64Sub: |
561 op = m->Int64Sub(); | 561 op = m->Int64Sub(); |
562 break; | 562 break; |
563 case wasm::kExprI64Mul: | 563 case wasm::kExprI64Mul: |
564 op = m->Int64Mul(); | 564 op = m->Int64Mul(); |
565 break; | 565 break; |
566 case wasm::kExprI64DivS: { | 566 case wasm::kExprI64DivS: { |
567 trap_->ZeroCheck64(kTrapDivByZero, right); | 567 trap_->ZeroCheck64(kTrapDivByZero, right); |
568 Node* before = *control_; | 568 Node* before = *control_; |
569 Node* denom_is_m1; | 569 Node* denom_is_m1; |
(...skipping 1904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2474 module_env->module->GetName(function.name_offset)); | 2474 module_env->module->GetName(function.name_offset)); |
2475 } | 2475 } |
2476 | 2476 |
2477 return code; | 2477 return code; |
2478 } | 2478 } |
2479 | 2479 |
2480 | 2480 |
2481 } // namespace compiler | 2481 } // namespace compiler |
2482 } // namespace internal | 2482 } // namespace internal |
2483 } // namespace v8 | 2483 } // namespace v8 |
OLD | NEW |