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

Side by Side Diff: src/compiler/ia32/code-generator-ia32.cc

Issue 1778493004: [wasm] Int64Lowering of Int64Add on ia32 and arm. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixed nits. 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
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/code-generator.h" 5 #include "src/compiler/code-generator.h"
6 6
7 #include "src/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/compiler/code-generator-impl.h" 8 #include "src/compiler/code-generator-impl.h"
9 #include "src/compiler/gap-resolver.h" 9 #include "src/compiler/gap-resolver.h"
10 #include "src/compiler/node-matchers.h" 10 #include "src/compiler/node-matchers.h"
(...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 __ shr_cl(i.OutputOperand()); 670 __ shr_cl(i.OutputOperand());
671 } 671 }
672 break; 672 break;
673 case kIA32Sar: 673 case kIA32Sar:
674 if (HasImmediateInput(instr, 1)) { 674 if (HasImmediateInput(instr, 1)) {
675 __ sar(i.OutputOperand(), i.InputInt5(1)); 675 __ sar(i.OutputOperand(), i.InputInt5(1));
676 } else { 676 } else {
677 __ sar_cl(i.OutputOperand()); 677 __ sar_cl(i.OutputOperand());
678 } 678 }
679 break; 679 break;
680 case kIA32AddPair: {
681 // i.OutputRegister(0) == i.InputRegister(0) ... left low word.
682 // i.InputRegister(1) ... left high word.
683 // i.InputRegister(2) ... right low word.
684 // i.InputRegister(3) ... right high word.
685 bool use_temp = false;
686 if (i.OutputRegister(0).code() == i.InputRegister(1).code() ||
687 i.OutputRegister(0).code() == i.InputRegister(3).code()) {
688 // We cannot write to the output register directly, because it would
689 // overwrite an input for adc. We have to use the temp register.
690 use_temp = true;
691 __ Move(i.TempRegister(0), i.InputRegister(0));
692 __ add(i.TempRegister(0), i.InputRegister(2));
693 } else {
694 __ add(i.OutputRegister(0), i.InputRegister(2));
695 }
696 __ adc(i.InputRegister(1), Operand(i.InputRegister(3)));
697 if (i.OutputRegister(1).code() != i.InputRegister(1).code()) {
698 __ Move(i.OutputRegister(1), i.InputRegister(1));
699 }
700 if (use_temp) {
701 __ Move(i.OutputRegister(0), i.TempRegister(0));
702 }
703 break;
704 }
680 case kIA32ShlPair: 705 case kIA32ShlPair:
681 if (HasImmediateInput(instr, 2)) { 706 if (HasImmediateInput(instr, 2)) {
682 __ ShlPair(i.InputRegister(1), i.InputRegister(0), i.InputInt6(2)); 707 __ ShlPair(i.InputRegister(1), i.InputRegister(0), i.InputInt6(2));
683 } else { 708 } else {
684 // Shift has been loaded into CL by the register allocator. 709 // Shift has been loaded into CL by the register allocator.
685 __ ShlPair_cl(i.InputRegister(1), i.InputRegister(0)); 710 __ ShlPair_cl(i.InputRegister(1), i.InputRegister(0));
686 } 711 }
687 break; 712 break;
688 case kIA32ShrPair: 713 case kIA32ShrPair:
689 if (HasImmediateInput(instr, 2)) { 714 if (HasImmediateInput(instr, 2)) {
(...skipping 1134 matching lines...) Expand 10 before | Expand all | Expand 10 after
1824 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; 1849 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc;
1825 __ Nop(padding_size); 1850 __ Nop(padding_size);
1826 } 1851 }
1827 } 1852 }
1828 1853
1829 #undef __ 1854 #undef __
1830 1855
1831 } // namespace compiler 1856 } // namespace compiler
1832 } // namespace internal 1857 } // namespace internal
1833 } // namespace v8 1858 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698