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

Side by Side Diff: src/mips64/macro-assembler-mips64.cc

Issue 1687173006: MIPS: Fix '[runtime] Optimize and unify rest parameters.' (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix nits. Created 4 years, 10 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/mips64/code-stubs-mips64.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 <limits.h> // For LONG_MIN, LONG_MAX. 5 #include <limits.h> // For LONG_MIN, LONG_MAX.
6 6
7 #if V8_TARGET_ARCH_MIPS64 7 #if V8_TARGET_ARCH_MIPS64
8 8
9 #include "src/base/division-by-constant.h" 9 #include "src/base/division-by-constant.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 3752 matching lines...) Expand 10 before | Expand all | Expand 10 after
3763 if (emit_debug_code()) { 3763 if (emit_debug_code()) {
3764 // Trash the registers to simulate an allocation failure. 3764 // Trash the registers to simulate an allocation failure.
3765 li(result, 0x7091); 3765 li(result, 0x7091);
3766 li(scratch1, 0x7191); 3766 li(scratch1, 0x7191);
3767 li(scratch2, 0x7291); 3767 li(scratch2, 0x7291);
3768 } 3768 }
3769 jmp(gc_required); 3769 jmp(gc_required);
3770 return; 3770 return;
3771 } 3771 }
3772 3772
3773 DCHECK(!AreAliased(result, scratch1, scratch2, t9)); 3773 DCHECK(!AreAliased(result, scratch1, scratch2, t9, at));
3774 3774
3775 // Make object size into bytes. 3775 // Make object size into bytes.
3776 if ((flags & SIZE_IN_WORDS) != 0) { 3776 if ((flags & SIZE_IN_WORDS) != 0) {
3777 object_size *= kPointerSize; 3777 object_size *= kPointerSize;
3778 } 3778 }
3779 DCHECK(0 == (object_size & kObjectAlignmentMask)); 3779 DCHECK(0 == (object_size & kObjectAlignmentMask));
3780 3780
3781 // Check relative positions of allocation top and limit addresses. 3781 // Check relative positions of allocation top and limit addresses.
3782 // ARM adds additional checks to make sure the ldm instruction can be 3782 // ARM adds additional checks to make sure the ldm instruction can be
3783 // used. On MIPS we don't have ldm so we don't need additional checks either. 3783 // used. On MIPS we don't have ldm so we don't need additional checks either.
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
3841 // Trash the registers to simulate an allocation failure. 3841 // Trash the registers to simulate an allocation failure.
3842 li(result, 0x7091); 3842 li(result, 0x7091);
3843 li(scratch, 0x7191); 3843 li(scratch, 0x7191);
3844 li(result_end, 0x7291); 3844 li(result_end, 0x7291);
3845 } 3845 }
3846 jmp(gc_required); 3846 jmp(gc_required);
3847 return; 3847 return;
3848 } 3848 }
3849 3849
3850 // |object_size| and |result_end| may overlap, other registers must not. 3850 // |object_size| and |result_end| may overlap, other registers must not.
3851 DCHECK(!AreAliased(object_size, result, scratch, t9)); 3851 DCHECK(!AreAliased(object_size, result, scratch, t9, at));
3852 DCHECK(!AreAliased(result_end, result, scratch, t9)); 3852 DCHECK(!AreAliased(result_end, result, scratch, t9, at));
3853 3853
3854 // Check relative positions of allocation top and limit addresses. 3854 // Check relative positions of allocation top and limit addresses.
3855 // ARM adds additional checks to make sure the ldm instruction can be 3855 // ARM adds additional checks to make sure the ldm instruction can be
3856 // used. On MIPS we don't have ldm so we don't need additional checks either. 3856 // used. On MIPS we don't have ldm so we don't need additional checks either.
3857 ExternalReference allocation_top = 3857 ExternalReference allocation_top =
3858 AllocationUtils::GetAllocationTopReference(isolate(), flags); 3858 AllocationUtils::GetAllocationTopReference(isolate(), flags);
3859 ExternalReference allocation_limit = 3859 ExternalReference allocation_limit =
3860 AllocationUtils::GetAllocationLimitReference(isolate(), flags); 3860 AllocationUtils::GetAllocationLimitReference(isolate(), flags);
3861 intptr_t top = reinterpret_cast<intptr_t>(allocation_top.address()); 3861 intptr_t top = reinterpret_cast<intptr_t>(allocation_top.address());
3862 intptr_t limit = reinterpret_cast<intptr_t>(allocation_limit.address()); 3862 intptr_t limit = reinterpret_cast<intptr_t>(allocation_limit.address());
(...skipping 2684 matching lines...) Expand 10 before | Expand all | Expand 10 after
6547 if (mag.shift > 0) sra(result, result, mag.shift); 6547 if (mag.shift > 0) sra(result, result, mag.shift);
6548 srl(at, dividend, 31); 6548 srl(at, dividend, 31);
6549 Addu(result, result, Operand(at)); 6549 Addu(result, result, Operand(at));
6550 } 6550 }
6551 6551
6552 6552
6553 } // namespace internal 6553 } // namespace internal
6554 } // namespace v8 6554 } // namespace v8
6555 6555
6556 #endif // V8_TARGET_ARCH_MIPS64 6556 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips64/code-stubs-mips64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698