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/elapsed-timer.h" | 9 #include "src/base/platform/elapsed-timer.h" |
10 #include "src/base/platform/platform.h" | 10 #include "src/base/platform/platform.h" |
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
487 case wasm::kExprI32GeU: | 487 case wasm::kExprI32GeU: |
488 op = m->Uint32LessThanOrEqual(); | 488 op = m->Uint32LessThanOrEqual(); |
489 std::swap(left, right); | 489 std::swap(left, right); |
490 break; | 490 break; |
491 case wasm::kExprI64And: | 491 case wasm::kExprI64And: |
492 op = m->Word64And(); | 492 op = m->Word64And(); |
493 break; | 493 break; |
494 // todo(ahaas): I added a list of missing instructions here to make merging | 494 // todo(ahaas): I added a list of missing instructions here to make merging |
495 // easier when I do them one by one. | 495 // easier when I do them one by one. |
496 // kExprI64Add: | 496 // kExprI64Add: |
| 497 case wasm::kExprI64Add: |
| 498 op = m->Int64Add(); |
| 499 break; |
497 // kExprI64Sub: | 500 // kExprI64Sub: |
498 // kExprI64Mul: | 501 // kExprI64Mul: |
499 // kExprI64DivS: | 502 // kExprI64DivS: |
500 // kExprI64DivU: | 503 // kExprI64DivU: |
501 // kExprI64RemS: | 504 // kExprI64RemS: |
502 // kExprI64RemU: | 505 // kExprI64RemU: |
503 case wasm::kExprI64Ior: | 506 case wasm::kExprI64Ior: |
504 op = m->Word64Or(); | 507 op = m->Word64Or(); |
505 break; | 508 break; |
506 // kExprI64Xor: | 509 // kExprI64Xor: |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
552 std::swap(left, right); | 555 std::swap(left, right); |
553 break; | 556 break; |
554 case wasm::kExprI64GeU: | 557 case wasm::kExprI64GeU: |
555 op = m->Uint64LessThanOrEqual(); | 558 op = m->Uint64LessThanOrEqual(); |
556 std::swap(left, right); | 559 std::swap(left, right); |
557 break; | 560 break; |
558 | 561 |
559 #if WASM_64 | 562 #if WASM_64 |
560 // Opcodes only supported on 64-bit platforms. | 563 // Opcodes only supported on 64-bit platforms. |
561 // TODO(titzer): query the machine operator builder here instead of #ifdef. | 564 // TODO(titzer): query the machine operator builder here instead of #ifdef. |
562 case wasm::kExprI64Add: | |
563 op = m->Int64Add(); | |
564 break; | |
565 case wasm::kExprI64Sub: | 565 case wasm::kExprI64Sub: |
566 op = m->Int64Sub(); | 566 op = m->Int64Sub(); |
567 break; | 567 break; |
568 case wasm::kExprI64Mul: | 568 case wasm::kExprI64Mul: |
569 op = m->Int64Mul(); | 569 op = m->Int64Mul(); |
570 break; | 570 break; |
571 case wasm::kExprI64DivS: { | 571 case wasm::kExprI64DivS: { |
572 trap_->ZeroCheck64(kTrapDivByZero, right); | 572 trap_->ZeroCheck64(kTrapDivByZero, right); |
573 Node* before = *control_; | 573 Node* before = *control_; |
574 Node* denom_is_m1; | 574 Node* denom_is_m1; |
(...skipping 1996 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2571 static_cast<int>(function.code_end_offset - function.code_start_offset), | 2571 static_cast<int>(function.code_end_offset - function.code_start_offset), |
2572 decode_ms, compile_ms); | 2572 decode_ms, compile_ms); |
2573 } | 2573 } |
2574 return code; | 2574 return code; |
2575 } | 2575 } |
2576 | 2576 |
2577 | 2577 |
2578 } // namespace compiler | 2578 } // namespace compiler |
2579 } // namespace internal | 2579 } // namespace internal |
2580 } // namespace v8 | 2580 } // namespace v8 |
OLD | NEW |