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

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

Issue 2087463004: Revert of [heap] Avoid the use of cells to point from code to new-space objects. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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/assembler-mips64-inl.h ('k') | src/objects.h » ('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 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 1579 matching lines...) Expand 10 before | Expand all | Expand 10 after
1590 if (kArchVariant == kMips64r6) { 1590 if (kArchVariant == kMips64r6) {
1591 sdc1(fd, rs); 1591 sdc1(fd, rs);
1592 } else { 1592 } else {
1593 DCHECK(kArchVariant == kMips64r2); 1593 DCHECK(kArchVariant == kMips64r2);
1594 dmfc1(scratch, fd); 1594 dmfc1(scratch, fd);
1595 Usd(scratch, rs); 1595 Usd(scratch, rs);
1596 } 1596 }
1597 } 1597 }
1598 1598
1599 void MacroAssembler::li(Register dst, Handle<Object> value, LiFlags mode) { 1599 void MacroAssembler::li(Register dst, Handle<Object> value, LiFlags mode) {
1600 AllowDeferredHandleDereference smi_check;
1600 if (value->IsSmi()) { 1601 if (value->IsSmi()) {
1601 li(dst, Operand(value), mode); 1602 li(dst, Operand(value), mode);
1602 } else { 1603 } else {
1603 DCHECK(value->IsHeapObject()); 1604 DCHECK(value->IsHeapObject());
1604 li(dst, Operand(value)); 1605 if (isolate()->heap()->InNewSpace(*value)) {
1606 Handle<Cell> cell = isolate()->factory()->NewCell(value);
1607 li(dst, Operand(cell));
1608 ld(dst, FieldMemOperand(dst, Cell::kValueOffset));
1609 } else {
1610 li(dst, Operand(value));
1611 }
1605 } 1612 }
1606 } 1613 }
1607 1614
1608 static inline int64_t ShiftAndFixSignExtension(int64_t imm, int bitnum) { 1615 static inline int64_t ShiftAndFixSignExtension(int64_t imm, int bitnum) {
1609 if ((imm >> (bitnum - 1)) & 0x1) { 1616 if ((imm >> (bitnum - 1)) & 0x1) {
1610 imm = (imm >> bitnum) + 1; 1617 imm = (imm >> bitnum) + 1;
1611 } else { 1618 } else {
1612 imm = imm >> bitnum; 1619 imm = imm >> bitnum;
1613 } 1620 }
1614 return imm; 1621 return imm;
(...skipping 5598 matching lines...) Expand 10 before | Expand all | Expand 10 after
7213 if (mag.shift > 0) sra(result, result, mag.shift); 7220 if (mag.shift > 0) sra(result, result, mag.shift);
7214 srl(at, dividend, 31); 7221 srl(at, dividend, 31);
7215 Addu(result, result, Operand(at)); 7222 Addu(result, result, Operand(at));
7216 } 7223 }
7217 7224
7218 7225
7219 } // namespace internal 7226 } // namespace internal
7220 } // namespace v8 7227 } // namespace v8
7221 7228
7222 #endif // V8_TARGET_ARCH_MIPS64 7229 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips64/assembler-mips64-inl.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698