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

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

Issue 1716243002: [wasm] Added I64Ior to the Int64Lowering. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@int64-lowering-unittest
Patch Set: rebase Created 4 years, 9 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
« no previous file with comments | « src/compiler/int64-lowering.cc ('k') | test/cctest/cctest.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 op = m->Uint32LessThan(); 478 op = m->Uint32LessThan();
479 std::swap(left, right); 479 std::swap(left, right);
480 break; 480 break;
481 case wasm::kExprI32GeU: 481 case wasm::kExprI32GeU:
482 op = m->Uint32LessThanOrEqual(); 482 op = m->Uint32LessThanOrEqual();
483 std::swap(left, right); 483 std::swap(left, right);
484 break; 484 break;
485 case wasm::kExprI64And: 485 case wasm::kExprI64And:
486 op = m->Word64And(); 486 op = m->Word64And();
487 break; 487 break;
488 // todo(ahaas): I added a list of missing instructions here to make merging
489 // easier when I do them one by one.
490 // kExprI64Add:
491 // kExprI64Sub:
492 // kExprI64Mul:
493 // kExprI64DivS:
494 // kExprI64DivU:
495 // kExprI64RemS:
496 // kExprI64RemU:
497 // kExprI64And:
498 // kExprI64Ior:
499 case wasm::kExprI64Ior:
500 op = m->Word64Or();
501 break;
502 // kExprI64Xor:
503 // kExprI64Shl:
504 // kExprI64ShrU:
505 // kExprI64ShrS:
506 // kExprI64Eq:
507 // kExprI64Ne:
508 // kExprI64LtS:
509 // kExprI64LeS:
510 // kExprI64LtU:
511 // kExprI64LeU:
512 // kExprI64GtS:
513 // kExprI64GeS:
514 // kExprI64GtU:
515 // kExprI64GeU:
516
517 // kExprI32ConvertI64:
518 // kExprI64SConvertI32:
519 // kExprI64UConvertI32:
520
521 // kExprF64ReinterpretI64:
522 // kExprI64ReinterpretF64:
523
524 // kExprI64Clz:
525 // kExprI64Ctz:
526 // kExprI64Popcnt:
527
528 // kExprF32SConvertI64:
529 // kExprF32UConvertI64:
530 // kExprF64SConvertI64:
531 // kExprF64UConvertI64:
532 // kExprI64SConvertF32:
533 // kExprI64SConvertF64:
534 // kExprI64UConvertF32:
535 // kExprI64UConvertF64:
488 #if WASM_64 536 #if WASM_64
489 // Opcodes only supported on 64-bit platforms. 537 // Opcodes only supported on 64-bit platforms.
490 // TODO(titzer): query the machine operator builder here instead of #ifdef. 538 // TODO(titzer): query the machine operator builder here instead of #ifdef.
491 case wasm::kExprI64Add: 539 case wasm::kExprI64Add:
492 op = m->Int64Add(); 540 op = m->Int64Add();
493 break; 541 break;
494 case wasm::kExprI64Sub: 542 case wasm::kExprI64Sub:
495 op = m->Int64Sub(); 543 op = m->Int64Sub();
496 break; 544 break;
497 case wasm::kExprI64Mul: 545 case wasm::kExprI64Mul:
(...skipping 30 matching lines...) Expand all
528 576
529 Node* rem = graph()->NewNode(m->Int64Mod(), left, right, d.if_false); 577 Node* rem = graph()->NewNode(m->Int64Mod(), left, right, d.if_false);
530 578
531 return d.Phi(MachineRepresentation::kWord64, jsgraph()->Int64Constant(0), 579 return d.Phi(MachineRepresentation::kWord64, jsgraph()->Int64Constant(0),
532 rem); 580 rem);
533 } 581 }
534 case wasm::kExprI64RemU: 582 case wasm::kExprI64RemU:
535 op = m->Uint64Mod(); 583 op = m->Uint64Mod();
536 return graph()->NewNode(op, left, right, 584 return graph()->NewNode(op, left, right,
537 trap_->ZeroCheck64(kTrapRemByZero, right)); 585 trap_->ZeroCheck64(kTrapRemByZero, right));
538 case wasm::kExprI64Ior:
539 op = m->Word64Or();
540 break;
541 case wasm::kExprI64Xor: 586 case wasm::kExprI64Xor:
542 op = m->Word64Xor(); 587 op = m->Word64Xor();
543 break; 588 break;
544 case wasm::kExprI64Shl: 589 case wasm::kExprI64Shl:
545 op = m->Word64Shl(); 590 op = m->Word64Shl();
546 break; 591 break;
547 case wasm::kExprI64ShrU: 592 case wasm::kExprI64ShrU:
548 op = m->Word64Shr(); 593 op = m->Word64Shr();
549 break; 594 break;
550 case wasm::kExprI64ShrS: 595 case wasm::kExprI64ShrS:
(...skipping 1658 matching lines...) Expand 10 before | Expand all | Expand 10 after
2209 module_env->module->GetName(function.name_offset)); 2254 module_env->module->GetName(function.name_offset));
2210 } 2255 }
2211 2256
2212 return code; 2257 return code;
2213 } 2258 }
2214 2259
2215 2260
2216 } // namespace compiler 2261 } // namespace compiler
2217 } // namespace internal 2262 } // namespace internal
2218 } // namespace v8 2263 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/int64-lowering.cc ('k') | test/cctest/cctest.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698