| 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 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 542 std::swap(left, right); | 542 std::swap(left, right); |
| 543 break; | 543 break; |
| 544 case wasm::kExprI64GtU: | 544 case wasm::kExprI64GtU: |
| 545 op = m->Uint64LessThan(); | 545 op = m->Uint64LessThan(); |
| 546 std::swap(left, right); | 546 std::swap(left, right); |
| 547 break; | 547 break; |
| 548 case wasm::kExprI64GeU: | 548 case wasm::kExprI64GeU: |
| 549 op = m->Uint64LessThanOrEqual(); | 549 op = m->Uint64LessThanOrEqual(); |
| 550 std::swap(left, right); | 550 std::swap(left, right); |
| 551 break; | 551 break; |
| 552 | |
| 553 #if WASM_64 | |
| 554 // Opcodes only supported on 64-bit platforms. | |
| 555 // TODO(titzer): query the machine operator builder here instead of #ifdef. | |
| 556 case wasm::kExprI64Ror: | 552 case wasm::kExprI64Ror: |
| 557 op = m->Word64Ror(); | 553 op = m->Word64Ror(); |
| 558 right = MaskShiftCount64(right); | |
| 559 break; | 554 break; |
| 560 case wasm::kExprI64Rol: | 555 case wasm::kExprI64Rol: |
| 561 right = MaskShiftCount64(right); | |
| 562 return BuildI64Rol(left, right); | 556 return BuildI64Rol(left, right); |
| 563 #endif | |
| 564 | |
| 565 case wasm::kExprF32CopySign: | 557 case wasm::kExprF32CopySign: |
| 566 return BuildF32CopySign(left, right); | 558 return BuildF32CopySign(left, right); |
| 567 case wasm::kExprF64CopySign: | 559 case wasm::kExprF64CopySign: |
| 568 return BuildF64CopySign(left, right); | 560 return BuildF64CopySign(left, right); |
| 569 case wasm::kExprF32Add: | 561 case wasm::kExprF32Add: |
| 570 op = m->Float32Add(); | 562 op = m->Float32Add(); |
| 571 break; | 563 break; |
| 572 case wasm::kExprF32Sub: | 564 case wasm::kExprF32Sub: |
| 573 op = m->Float32Sub(); | 565 op = m->Float32Sub(); |
| 574 break; | 566 break; |
| (...skipping 2229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2804 static_cast<int>(function.code_end_offset - function.code_start_offset), | 2796 static_cast<int>(function.code_end_offset - function.code_start_offset), |
| 2805 decode_ms, static_cast<int>(graph.NodeCount()), compile_ms); | 2797 decode_ms, static_cast<int>(graph.NodeCount()), compile_ms); |
| 2806 } | 2798 } |
| 2807 return code; | 2799 return code; |
| 2808 } | 2800 } |
| 2809 | 2801 |
| 2810 | 2802 |
| 2811 } // namespace compiler | 2803 } // namespace compiler |
| 2812 } // namespace internal | 2804 } // namespace internal |
| 2813 } // namespace v8 | 2805 } // namespace v8 |
| OLD | NEW |