Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Side by Side Diff: src/compiler/wasm-compiler.cc

Issue 1729263002: [wasm] I added comparison operators to the Int64Lowering. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 // kExprI64Xor: 502 // kExprI64Xor:
503 case wasm::kExprI64Xor: 503 case wasm::kExprI64Xor:
504 op = m->Word64Xor(); 504 op = m->Word64Xor();
505 break; 505 break;
506 // kExprI64Shl: 506 // kExprI64Shl:
507 // kExprI64ShrU: 507 // kExprI64ShrU:
508 // kExprI64ShrS: 508 // kExprI64ShrS:
509 // kExprI64Eq: 509 // kExprI64Eq:
510 // kExprI64Ne: 510 // kExprI64Ne:
511 // kExprI64LtS: 511 // kExprI64LtS:
512 // kExprI64LeS: 512 case wasm::kExprI64LtS:
513 // kExprI64LtU: 513 op = m->Int64LessThan();
514 // kExprI64LeU: 514 break;
515 // kExprI64GtS: 515 // kExprI64LeS:
titzer 2016/02/24 17:41:35 You can drop the comments from the cases.
ahaas 2016/02/25 11:56:08 I added these comments to avoid merge conflicts. I
516 // kExprI64GeS: 516 case wasm::kExprI64LeS:
517 // kExprI64GtU: 517 op = m->Int64LessThanOrEqual();
518 // kExprI64GeU: 518 break;
519 // kExprI64LtU:
520 case wasm::kExprI64LtU:
521 op = m->Uint64LessThan();
522 break;
523 // kExprI64LeU:
524 case wasm::kExprI64LeU:
525 op = m->Uint64LessThanOrEqual();
526 break;
527 // kExprI64GtS:
528 case wasm::kExprI64GtS:
529 op = m->Int64LessThan();
530 std::swap(left, right);
531 break;
532 // kExprI64GeS:
533 case wasm::kExprI64GeS:
534 op = m->Int64LessThanOrEqual();
535 std::swap(left, right);
536 break;
537 // kExprI64GtU:
538 case wasm::kExprI64GtU:
539 op = m->Uint64LessThan();
540 std::swap(left, right);
541 break;
542 // kExprI64GeU:
543 case wasm::kExprI64GeU:
544 op = m->Uint64LessThanOrEqual();
545 std::swap(left, right);
546 break;
519 547
520 // kExprI32ConvertI64: 548 // kExprI32ConvertI64:
521 // kExprI64SConvertI32: 549 // kExprI64SConvertI32:
522 // kExprI64UConvertI32: 550 // kExprI64UConvertI32:
523 551
524 // kExprF64ReinterpretI64: 552 // kExprF64ReinterpretI64:
525 // kExprI64ReinterpretF64: 553 // kExprI64ReinterpretF64:
526 554
527 // kExprI64Clz: 555 // kExprI64Clz:
528 // kExprI64Ctz: 556 // kExprI64Ctz:
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 op = m->Word64Shr(); 621 op = m->Word64Shr();
594 break; 622 break;
595 case wasm::kExprI64ShrS: 623 case wasm::kExprI64ShrS:
596 op = m->Word64Sar(); 624 op = m->Word64Sar();
597 break; 625 break;
598 case wasm::kExprI64Eq: 626 case wasm::kExprI64Eq:
599 op = m->Word64Equal(); 627 op = m->Word64Equal();
600 break; 628 break;
601 case wasm::kExprI64Ne: 629 case wasm::kExprI64Ne:
602 return Invert(Binop(wasm::kExprI64Eq, left, right)); 630 return Invert(Binop(wasm::kExprI64Eq, left, right));
603 case wasm::kExprI64LtS:
604 op = m->Int64LessThan();
605 break;
606 case wasm::kExprI64LeS:
607 op = m->Int64LessThanOrEqual();
608 break;
609 case wasm::kExprI64LtU:
610 op = m->Uint64LessThan();
611 break;
612 case wasm::kExprI64LeU:
613 op = m->Uint64LessThanOrEqual();
614 break;
615 case wasm::kExprI64GtS:
616 op = m->Int64LessThan();
617 std::swap(left, right);
618 break;
619 case wasm::kExprI64GeS:
620 op = m->Int64LessThanOrEqual();
621 std::swap(left, right);
622 break;
623 case wasm::kExprI64GtU:
624 op = m->Uint64LessThan();
625 std::swap(left, right);
626 break;
627 case wasm::kExprI64GeU:
628 op = m->Uint64LessThanOrEqual();
629 std::swap(left, right);
630 break;
631 #endif 631 #endif
632 632
633 case wasm::kExprF32CopySign: 633 case wasm::kExprF32CopySign:
634 return BuildF32CopySign(left, right); 634 return BuildF32CopySign(left, right);
635 case wasm::kExprF64CopySign: 635 case wasm::kExprF64CopySign:
636 return BuildF64CopySign(left, right); 636 return BuildF64CopySign(left, right);
637 case wasm::kExprF32Add: 637 case wasm::kExprF32Add:
638 op = m->Float32Add(); 638 op = m->Float32Add();
639 break; 639 break;
640 case wasm::kExprF32Sub: 640 case wasm::kExprF32Sub:
(...skipping 1613 matching lines...) Expand 10 before | Expand all | Expand 10 after
2254 module_env->module->GetName(function.name_offset)); 2254 module_env->module->GetName(function.name_offset));
2255 } 2255 }
2256 2256
2257 return code; 2257 return code;
2258 } 2258 }
2259 2259
2260 2260
2261 } // namespace compiler 2261 } // namespace compiler
2262 } // namespace internal 2262 } // namespace internal
2263 } // namespace v8 2263 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698