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

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

Issue 2090983002: Revert of Reland [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 1577 matching lines...) Expand 10 before | Expand all | Expand 10 after
1588 if (kArchVariant == kMips64r6) { 1588 if (kArchVariant == kMips64r6) {
1589 sdc1(fd, rs); 1589 sdc1(fd, rs);
1590 } else { 1590 } else {
1591 DCHECK(kArchVariant == kMips64r2); 1591 DCHECK(kArchVariant == kMips64r2);
1592 dmfc1(scratch, fd); 1592 dmfc1(scratch, fd);
1593 Usd(scratch, rs); 1593 Usd(scratch, rs);
1594 } 1594 }
1595 } 1595 }
1596 1596
1597 void MacroAssembler::li(Register dst, Handle<Object> value, LiFlags mode) { 1597 void MacroAssembler::li(Register dst, Handle<Object> value, LiFlags mode) {
1598 li(dst, Operand(value), mode); 1598 AllowDeferredHandleDereference smi_check;
1599 if (value->IsSmi()) {
1600 li(dst, Operand(value), mode);
1601 } else {
1602 DCHECK(value->IsHeapObject());
1603 if (isolate()->heap()->InNewSpace(*value)) {
1604 Handle<Cell> cell = isolate()->factory()->NewCell(value);
1605 li(dst, Operand(cell));
1606 ld(dst, FieldMemOperand(dst, Cell::kValueOffset));
1607 } else {
1608 li(dst, Operand(value));
1609 }
1610 }
1599 } 1611 }
1600 1612
1601 static inline int64_t ShiftAndFixSignExtension(int64_t imm, int bitnum) { 1613 static inline int64_t ShiftAndFixSignExtension(int64_t imm, int bitnum) {
1602 if ((imm >> (bitnum - 1)) & 0x1) { 1614 if ((imm >> (bitnum - 1)) & 0x1) {
1603 imm = (imm >> bitnum) + 1; 1615 imm = (imm >> bitnum) + 1;
1604 } else { 1616 } else {
1605 imm = imm >> bitnum; 1617 imm = imm >> bitnum;
1606 } 1618 }
1607 return imm; 1619 return imm;
1608 } 1620 }
(...skipping 5597 matching lines...) Expand 10 before | Expand all | Expand 10 after
7206 if (mag.shift > 0) sra(result, result, mag.shift); 7218 if (mag.shift > 0) sra(result, result, mag.shift);
7207 srl(at, dividend, 31); 7219 srl(at, dividend, 31);
7208 Addu(result, result, Operand(at)); 7220 Addu(result, result, Operand(at));
7209 } 7221 }
7210 7222
7211 7223
7212 } // namespace internal 7224 } // namespace internal
7213 } // namespace v8 7225 } // namespace v8
7214 7226
7215 #endif // V8_TARGET_ARCH_MIPS64 7227 #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