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

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

Issue 1309163006: MIPS: Fix MacroAssembler::AssertFunction() (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 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 | « no previous file | src/mips64/macro-assembler-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 1
2 // Copyright 2012 the V8 project authors. All rights reserved. 2 // Copyright 2012 the V8 project authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be 3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file. 4 // found in the LICENSE file.
5 5
6 #include <limits.h> // For LONG_MIN, LONG_MAX. 6 #include <limits.h> // For LONG_MIN, LONG_MAX.
7 7
8 #if V8_TARGET_ARCH_MIPS 8 #if V8_TARGET_ARCH_MIPS
9 9
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 5162 matching lines...) Expand 10 before | Expand all | Expand 10 after
5173 pop(object); 5173 pop(object);
5174 } 5174 }
5175 } 5175 }
5176 5176
5177 5177
5178 void MacroAssembler::AssertFunction(Register object) { 5178 void MacroAssembler::AssertFunction(Register object) {
5179 if (emit_debug_code()) { 5179 if (emit_debug_code()) {
5180 STATIC_ASSERT(kSmiTag == 0); 5180 STATIC_ASSERT(kSmiTag == 0);
5181 SmiTst(object, t0); 5181 SmiTst(object, t0);
5182 Check(ne, kOperandIsASmiAndNotAFunction, t0, Operand(zero_reg)); 5182 Check(ne, kOperandIsASmiAndNotAFunction, t0, Operand(zero_reg));
5183 push(object); 5183 GetObjectType(object, t0, t0);
5184 GetObjectType(object, object, object); 5184 Check(eq, kOperandIsNotAFunction, t0, Operand(JS_FUNCTION_TYPE));
5185 pop(object);
5186 Check(eq, kOperandIsNotAFunction, object, Operand(JS_FUNCTION_TYPE));
5187 } 5185 }
5188 } 5186 }
5189 5187
5190 5188
5191 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object, 5189 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object,
5192 Register scratch) { 5190 Register scratch) {
5193 if (emit_debug_code()) { 5191 if (emit_debug_code()) {
5194 Label done_checking; 5192 Label done_checking;
5195 AssertNotSmi(object); 5193 AssertNotSmi(object);
5196 LoadRoot(scratch, Heap::kUndefinedValueRootIndex); 5194 LoadRoot(scratch, Heap::kUndefinedValueRootIndex);
(...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after
6024 if (mag.shift > 0) sra(result, result, mag.shift); 6022 if (mag.shift > 0) sra(result, result, mag.shift);
6025 srl(at, dividend, 31); 6023 srl(at, dividend, 31);
6026 Addu(result, result, Operand(at)); 6024 Addu(result, result, Operand(at));
6027 } 6025 }
6028 6026
6029 6027
6030 } // namespace internal 6028 } // namespace internal
6031 } // namespace v8 6029 } // namespace v8
6032 6030
6033 #endif // V8_TARGET_ARCH_MIPS 6031 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « no previous file | src/mips64/macro-assembler-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698