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/mips64/code-generator-mips64.cc

Issue 2816743003: [turbofan] Add alignment parameter to StackSlot operator (Closed)
Patch Set: Small fixes in test 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
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 795 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 __ Sd(value, MemOperand(at)); 806 __ Sd(value, MemOperand(at));
807 __ CheckPageFlag(object, scratch0, 807 __ CheckPageFlag(object, scratch0,
808 MemoryChunk::kPointersFromHereAreInterestingMask, ne, 808 MemoryChunk::kPointersFromHereAreInterestingMask, ne,
809 ool->entry()); 809 ool->entry());
810 __ bind(ool->exit()); 810 __ bind(ool->exit());
811 break; 811 break;
812 } 812 }
813 case kArchStackSlot: { 813 case kArchStackSlot: {
814 FrameOffset offset = 814 FrameOffset offset =
815 frame_access_state()->GetFrameOffset(i.InputInt32(0)); 815 frame_access_state()->GetFrameOffset(i.InputInt32(0));
816 __ Daddu(i.OutputRegister(), offset.from_stack_pointer() ? sp : fp, 816 Register base_reg = offset.from_stack_pointer() ? sp : fp;
817 Operand(offset.offset())); 817 __ Daddu(i.OutputRegister(), base_reg, Operand(offset.offset()));
818 int alignment = i.InputInt32(1);
819 DCHECK(alignment == 0 || alignment == 4 || alignment == 8 ||
820 alignment == 16);
821 if (FLAG_debug_code && alignment > 0) {
822 // Verify that the output_register is properly aligned
823 __ And(kScratchReg, i.OutputRegister(), Operand(kPointerSize - 1));
824 __ Assert(eq, kAllocationIsNotDoubleAligned, kScratchReg,
825 Operand(zero_reg));
826 }
827 if (alignment == 2 * kPointerSize) {
828 Label done;
829 __ Daddu(kScratchReg, base_reg, Operand(offset.offset()));
830 __ And(kScratchReg, kScratchReg, Operand(alignment - 1));
831 __ BranchShort(&done, eq, kScratchReg, Operand(zero_reg));
832 __ Daddu(i.OutputRegister(), i.OutputRegister(), kPointerSize);
833 __ bind(&done);
834 } else if (alignment > 2 * kPointerSize) {
835 Label done;
836 __ Daddu(kScratchReg, base_reg, Operand(offset.offset()));
837 __ And(kScratchReg, kScratchReg, Operand(alignment - 1));
838 __ BranchShort(&done, eq, kScratchReg, Operand(zero_reg));
839 __ li(kScratchReg2, alignment);
840 __ Dsubu(kScratchReg2, kScratchReg2, Operand(kScratchReg));
841 __ Daddu(i.OutputRegister(), i.OutputRegister(), kScratchReg2);
842 __ bind(&done);
843 }
844
818 break; 845 break;
819 } 846 }
820 case kIeee754Float64Acos: 847 case kIeee754Float64Acos:
821 ASSEMBLE_IEEE754_UNOP(acos); 848 ASSEMBLE_IEEE754_UNOP(acos);
822 break; 849 break;
823 case kIeee754Float64Acosh: 850 case kIeee754Float64Acosh:
824 ASSEMBLE_IEEE754_UNOP(acosh); 851 ASSEMBLE_IEEE754_UNOP(acosh);
825 break; 852 break;
826 case kIeee754Float64Asin: 853 case kIeee754Float64Asin:
827 ASSEMBLE_IEEE754_UNOP(asin); 854 ASSEMBLE_IEEE754_UNOP(asin);
(...skipping 2213 matching lines...) Expand 10 before | Expand all | Expand 10 after
3041 padding_size -= v8::internal::Assembler::kInstrSize; 3068 padding_size -= v8::internal::Assembler::kInstrSize;
3042 } 3069 }
3043 } 3070 }
3044 } 3071 }
3045 3072
3046 #undef __ 3073 #undef __
3047 3074
3048 } // namespace compiler 3075 } // namespace compiler
3049 } // namespace internal 3076 } // namespace internal
3050 } // namespace v8 3077 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/mips/instruction-selector-mips.cc ('k') | src/compiler/mips64/instruction-selector-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698