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

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

Issue 892613003: MIPS: Reland "Initial switch to Chromium-style CHECK_* and DCHECK_* macros.". (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove printf formatter changes. Created 5 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/macro-assembler-mips64.h ('k') | src/mips64/simulator-mips64.cc » ('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 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #if V8_TARGET_ARCH_MIPS64 9 #if V8_TARGET_ARCH_MIPS64
10 10
(...skipping 3216 matching lines...) Expand 10 before | Expand all | Expand 10 after
3227 // pushing on the stack. 3227 // pushing on the stack.
3228 // Set up the code object (a5) and the state (a6) for pushing. 3228 // Set up the code object (a5) and the state (a6) for pushing.
3229 unsigned state = 3229 unsigned state =
3230 StackHandler::IndexField::encode(handler_index) | 3230 StackHandler::IndexField::encode(handler_index) |
3231 StackHandler::KindField::encode(kind); 3231 StackHandler::KindField::encode(kind);
3232 li(a5, Operand(CodeObject()), CONSTANT_SIZE); 3232 li(a5, Operand(CodeObject()), CONSTANT_SIZE);
3233 li(a6, Operand(state)); 3233 li(a6, Operand(state));
3234 3234
3235 // Push the frame pointer, context, state, and code object. 3235 // Push the frame pointer, context, state, and code object.
3236 if (kind == StackHandler::JS_ENTRY) { 3236 if (kind == StackHandler::JS_ENTRY) {
3237 DCHECK_EQ(Smi::FromInt(0), 0); 3237 DCHECK_EQ(static_cast<Smi*>(0), Smi::FromInt(0));
3238 // The second zero_reg indicates no context. 3238 // The second zero_reg indicates no context.
3239 // The first zero_reg is the NULL frame pointer. 3239 // The first zero_reg is the NULL frame pointer.
3240 // The operands are reversed to match the order of MultiPush/Pop. 3240 // The operands are reversed to match the order of MultiPush/Pop.
3241 Push(zero_reg, zero_reg, a6, a5); 3241 Push(zero_reg, zero_reg, a6, a5);
3242 } else { 3242 } else {
3243 MultiPush(a5.bit() | a6.bit() | cp.bit() | fp.bit()); 3243 MultiPush(a5.bit() | a6.bit() | cp.bit() | fp.bit());
3244 } 3244 }
3245 3245
3246 // Link the current handler as the next handler. 3246 // Link the current handler as the next handler.
3247 li(a6, Operand(ExternalReference(Isolate::kHandlerAddress, isolate()))); 3247 li(a6, Operand(ExternalReference(Isolate::kHandlerAddress, isolate())));
(...skipping 1967 matching lines...) Expand 10 before | Expand all | Expand 10 after
5215 5215
5216 5216
5217 void MacroAssembler::JumpIfNotBothSmi(Register reg1, 5217 void MacroAssembler::JumpIfNotBothSmi(Register reg1,
5218 Register reg2, 5218 Register reg2,
5219 Label* on_not_both_smi) { 5219 Label* on_not_both_smi) {
5220 STATIC_ASSERT(kSmiTag == 0); 5220 STATIC_ASSERT(kSmiTag == 0);
5221 // TODO(plind): Find some better to fix this assert issue. 5221 // TODO(plind): Find some better to fix this assert issue.
5222 #if defined(__APPLE__) 5222 #if defined(__APPLE__)
5223 DCHECK_EQ(1, kSmiTagMask); 5223 DCHECK_EQ(1, kSmiTagMask);
5224 #else 5224 #else
5225 DCHECK_EQ((uint64_t)1, kSmiTagMask); 5225 DCHECK_EQ((int64_t)1, kSmiTagMask);
5226 #endif 5226 #endif
5227 or_(at, reg1, reg2); 5227 or_(at, reg1, reg2);
5228 JumpIfNotSmi(at, on_not_both_smi); 5228 JumpIfNotSmi(at, on_not_both_smi);
5229 } 5229 }
5230 5230
5231 5231
5232 void MacroAssembler::JumpIfEitherSmi(Register reg1, 5232 void MacroAssembler::JumpIfEitherSmi(Register reg1,
5233 Register reg2, 5233 Register reg2,
5234 Label* on_either_smi) { 5234 Label* on_either_smi) {
5235 STATIC_ASSERT(kSmiTag == 0); 5235 STATIC_ASSERT(kSmiTag == 0);
5236 // TODO(plind): Find some better to fix this assert issue. 5236 // TODO(plind): Find some better to fix this assert issue.
5237 #if defined(__APPLE__) 5237 #if defined(__APPLE__)
5238 DCHECK_EQ(1, kSmiTagMask); 5238 DCHECK_EQ(1, kSmiTagMask);
5239 #else 5239 #else
5240 DCHECK_EQ((uint64_t)1, kSmiTagMask); 5240 DCHECK_EQ((int64_t)1, kSmiTagMask);
5241 #endif 5241 #endif
5242 // Both Smi tags must be 1 (not Smi). 5242 // Both Smi tags must be 1 (not Smi).
5243 and_(at, reg1, reg2); 5243 and_(at, reg1, reg2);
5244 JumpIfSmi(at, on_either_smi); 5244 JumpIfSmi(at, on_either_smi);
5245 } 5245 }
5246 5246
5247 5247
5248 void MacroAssembler::AssertNotSmi(Register object) { 5248 void MacroAssembler::AssertNotSmi(Register object) {
5249 if (emit_debug_code()) { 5249 if (emit_debug_code()) {
5250 STATIC_ASSERT(kSmiTag == 0); 5250 STATIC_ASSERT(kSmiTag == 0);
(...skipping 950 matching lines...) Expand 10 before | Expand all | Expand 10 after
6201 } 6201 }
6202 if (mag.shift > 0) sra(result, result, mag.shift); 6202 if (mag.shift > 0) sra(result, result, mag.shift);
6203 srl(at, dividend, 31); 6203 srl(at, dividend, 31);
6204 Addu(result, result, Operand(at)); 6204 Addu(result, result, Operand(at));
6205 } 6205 }
6206 6206
6207 6207
6208 } } // namespace v8::internal 6208 } } // namespace v8::internal
6209 6209
6210 #endif // V8_TARGET_ARCH_MIPS64 6210 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips64/macro-assembler-mips64.h ('k') | src/mips64/simulator-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698