| OLD | NEW |
| 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 Loading... |
| 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 Register base_reg = offset.from_stack_pointer() ? sp : fp; | 816 __ Daddu(i.OutputRegister(), offset.from_stack_pointer() ? sp : fp, |
| 817 __ Daddu(i.OutputRegister(), base_reg, Operand(offset.offset())); | 817 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 | |
| 845 break; | 818 break; |
| 846 } | 819 } |
| 847 case kIeee754Float64Acos: | 820 case kIeee754Float64Acos: |
| 848 ASSEMBLE_IEEE754_UNOP(acos); | 821 ASSEMBLE_IEEE754_UNOP(acos); |
| 849 break; | 822 break; |
| 850 case kIeee754Float64Acosh: | 823 case kIeee754Float64Acosh: |
| 851 ASSEMBLE_IEEE754_UNOP(acosh); | 824 ASSEMBLE_IEEE754_UNOP(acosh); |
| 852 break; | 825 break; |
| 853 case kIeee754Float64Asin: | 826 case kIeee754Float64Asin: |
| 854 ASSEMBLE_IEEE754_UNOP(asin); | 827 ASSEMBLE_IEEE754_UNOP(asin); |
| (...skipping 2213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3068 padding_size -= v8::internal::Assembler::kInstrSize; | 3041 padding_size -= v8::internal::Assembler::kInstrSize; |
| 3069 } | 3042 } |
| 3070 } | 3043 } |
| 3071 } | 3044 } |
| 3072 | 3045 |
| 3073 #undef __ | 3046 #undef __ |
| 3074 | 3047 |
| 3075 } // namespace compiler | 3048 } // namespace compiler |
| 3076 } // namespace internal | 3049 } // namespace internal |
| 3077 } // namespace v8 | 3050 } // namespace v8 |
| OLD | NEW |