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

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

Issue 2867403002: Revert of [turbofan] Add alignment parameter to StackSlot operator (Closed)
Patch Set: Created 3 years, 7 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/machine-operator.cc ('k') | src/compiler/mips/instruction-selector-mips.cc » ('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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 #include "src/compilation-info.h" 6 #include "src/compilation-info.h"
7 #include "src/compiler/code-generator-impl.h" 7 #include "src/compiler/code-generator-impl.h"
8 #include "src/compiler/gap-resolver.h" 8 #include "src/compiler/gap-resolver.h"
9 #include "src/compiler/node-matchers.h" 9 #include "src/compiler/node-matchers.h"
10 #include "src/compiler/osr.h" 10 #include "src/compiler/osr.h"
(...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after
768 __ sw(value, MemOperand(at)); 768 __ sw(value, MemOperand(at));
769 __ CheckPageFlag(object, scratch0, 769 __ CheckPageFlag(object, scratch0,
770 MemoryChunk::kPointersFromHereAreInterestingMask, ne, 770 MemoryChunk::kPointersFromHereAreInterestingMask, ne,
771 ool->entry()); 771 ool->entry());
772 __ bind(ool->exit()); 772 __ bind(ool->exit());
773 break; 773 break;
774 } 774 }
775 case kArchStackSlot: { 775 case kArchStackSlot: {
776 FrameOffset offset = 776 FrameOffset offset =
777 frame_access_state()->GetFrameOffset(i.InputInt32(0)); 777 frame_access_state()->GetFrameOffset(i.InputInt32(0));
778 Register base_reg = offset.from_stack_pointer() ? sp : fp; 778 __ Addu(i.OutputRegister(), offset.from_stack_pointer() ? sp : fp,
779 __ Addu(i.OutputRegister(), base_reg, Operand(offset.offset())); 779 Operand(offset.offset()));
780 int alignment = i.InputInt32(1);
781 DCHECK(alignment == 0 || alignment == 4 || alignment == 8 ||
782 alignment == 16);
783 if (FLAG_debug_code && alignment > 0) {
784 // Verify that the output_register is properly aligned
785 __ And(kScratchReg, i.OutputRegister(), Operand(kPointerSize - 1));
786 __ Assert(eq, kAllocationIsNotDoubleAligned, kScratchReg,
787 Operand(zero_reg));
788 }
789
790 if (alignment == 2 * kPointerSize) {
791 Label done;
792 __ Addu(kScratchReg, base_reg, Operand(offset.offset()));
793 __ And(kScratchReg, kScratchReg, Operand(alignment - 1));
794 __ BranchShort(&done, eq, kScratchReg, Operand(zero_reg));
795 __ Addu(i.OutputRegister(), i.OutputRegister(), kPointerSize);
796 __ bind(&done);
797 } else if (alignment > 2 * kPointerSize) {
798 Label done;
799 __ Addu(kScratchReg, base_reg, Operand(offset.offset()));
800 __ And(kScratchReg, kScratchReg, Operand(alignment - 1));
801 __ BranchShort(&done, eq, kScratchReg, Operand(zero_reg));
802 __ li(kScratchReg2, alignment);
803 __ Subu(kScratchReg2, kScratchReg2, Operand(kScratchReg));
804 __ Addu(i.OutputRegister(), i.OutputRegister(), kScratchReg2);
805 __ bind(&done);
806 }
807 break; 780 break;
808 } 781 }
809 case kIeee754Float64Acos: 782 case kIeee754Float64Acos:
810 ASSEMBLE_IEEE754_UNOP(acos); 783 ASSEMBLE_IEEE754_UNOP(acos);
811 break; 784 break;
812 case kIeee754Float64Acosh: 785 case kIeee754Float64Acosh:
813 ASSEMBLE_IEEE754_UNOP(acosh); 786 ASSEMBLE_IEEE754_UNOP(acosh);
814 break; 787 break;
815 case kIeee754Float64Asin: 788 case kIeee754Float64Asin:
816 ASSEMBLE_IEEE754_UNOP(asin); 789 ASSEMBLE_IEEE754_UNOP(asin);
(...skipping 1949 matching lines...) Expand 10 before | Expand all | Expand 10 after
2766 padding_size -= v8::internal::Assembler::kInstrSize; 2739 padding_size -= v8::internal::Assembler::kInstrSize;
2767 } 2740 }
2768 } 2741 }
2769 } 2742 }
2770 2743
2771 #undef __ 2744 #undef __
2772 2745
2773 } // namespace compiler 2746 } // namespace compiler
2774 } // namespace internal 2747 } // namespace internal
2775 } // namespace v8 2748 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/machine-operator.cc ('k') | src/compiler/mips/instruction-selector-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698