OLD | NEW |
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_MIPS | 7 #if V8_TARGET_ARCH_MIPS |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/base/division-by-constant.h" | 10 #include "src/base/division-by-constant.h" |
(...skipping 4196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4207 void MacroAssembler::InvokeFunction(Handle<JSFunction> function, | 4207 void MacroAssembler::InvokeFunction(Handle<JSFunction> function, |
4208 const ParameterCount& expected, | 4208 const ParameterCount& expected, |
4209 const ParameterCount& actual, | 4209 const ParameterCount& actual, |
4210 InvokeFlag flag, | 4210 InvokeFlag flag, |
4211 const CallWrapper& call_wrapper) { | 4211 const CallWrapper& call_wrapper) { |
4212 li(a1, function); | 4212 li(a1, function); |
4213 InvokeFunction(a1, expected, actual, flag, call_wrapper); | 4213 InvokeFunction(a1, expected, actual, flag, call_wrapper); |
4214 } | 4214 } |
4215 | 4215 |
4216 | 4216 |
4217 void MacroAssembler::IsObjectJSObjectType(Register heap_object, | |
4218 Register map, | |
4219 Register scratch, | |
4220 Label* fail) { | |
4221 lw(map, FieldMemOperand(heap_object, HeapObject::kMapOffset)); | |
4222 IsInstanceJSObjectType(map, scratch, fail); | |
4223 } | |
4224 | |
4225 | |
4226 void MacroAssembler::IsInstanceJSObjectType(Register map, | |
4227 Register scratch, | |
4228 Label* fail) { | |
4229 lbu(scratch, FieldMemOperand(map, Map::kInstanceTypeOffset)); | |
4230 Branch(fail, lt, scratch, Operand(FIRST_NONCALLABLE_SPEC_OBJECT_TYPE)); | |
4231 Branch(fail, gt, scratch, Operand(LAST_NONCALLABLE_SPEC_OBJECT_TYPE)); | |
4232 } | |
4233 | |
4234 | |
4235 void MacroAssembler::IsObjectJSStringType(Register object, | 4217 void MacroAssembler::IsObjectJSStringType(Register object, |
4236 Register scratch, | 4218 Register scratch, |
4237 Label* fail) { | 4219 Label* fail) { |
4238 DCHECK(kNotStringTag != 0); | 4220 DCHECK(kNotStringTag != 0); |
4239 | 4221 |
4240 lw(scratch, FieldMemOperand(object, HeapObject::kMapOffset)); | 4222 lw(scratch, FieldMemOperand(object, HeapObject::kMapOffset)); |
4241 lbu(scratch, FieldMemOperand(scratch, Map::kInstanceTypeOffset)); | 4223 lbu(scratch, FieldMemOperand(scratch, Map::kInstanceTypeOffset)); |
4242 And(scratch, scratch, Operand(kIsNotStringMask)); | 4224 And(scratch, scratch, Operand(kIsNotStringMask)); |
4243 Branch(fail, ne, scratch, Operand(zero_reg)); | 4225 Branch(fail, ne, scratch, Operand(zero_reg)); |
4244 } | 4226 } |
(...skipping 1777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6022 if (mag.shift > 0) sra(result, result, mag.shift); | 6004 if (mag.shift > 0) sra(result, result, mag.shift); |
6023 srl(at, dividend, 31); | 6005 srl(at, dividend, 31); |
6024 Addu(result, result, Operand(at)); | 6006 Addu(result, result, Operand(at)); |
6025 } | 6007 } |
6026 | 6008 |
6027 | 6009 |
6028 } // namespace internal | 6010 } // namespace internal |
6029 } // namespace v8 | 6011 } // namespace v8 |
6030 | 6012 |
6031 #endif // V8_TARGET_ARCH_MIPS | 6013 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |