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_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 4199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4210 void MacroAssembler::InvokeFunction(Handle<JSFunction> function, | 4210 void MacroAssembler::InvokeFunction(Handle<JSFunction> function, |
4211 const ParameterCount& expected, | 4211 const ParameterCount& expected, |
4212 const ParameterCount& actual, | 4212 const ParameterCount& actual, |
4213 InvokeFlag flag, | 4213 InvokeFlag flag, |
4214 const CallWrapper& call_wrapper) { | 4214 const CallWrapper& call_wrapper) { |
4215 li(a1, function); | 4215 li(a1, function); |
4216 InvokeFunction(a1, expected, actual, flag, call_wrapper); | 4216 InvokeFunction(a1, expected, actual, flag, call_wrapper); |
4217 } | 4217 } |
4218 | 4218 |
4219 | 4219 |
| 4220 void MacroAssembler::IsObjectJSObjectType(Register heap_object, |
| 4221 Register map, |
| 4222 Register scratch, |
| 4223 Label* fail) { |
| 4224 ld(map, FieldMemOperand(heap_object, HeapObject::kMapOffset)); |
| 4225 IsInstanceJSObjectType(map, scratch, fail); |
| 4226 } |
| 4227 |
| 4228 |
| 4229 void MacroAssembler::IsInstanceJSObjectType(Register map, |
| 4230 Register scratch, |
| 4231 Label* fail) { |
| 4232 lbu(scratch, FieldMemOperand(map, Map::kInstanceTypeOffset)); |
| 4233 Branch(fail, lt, scratch, Operand(FIRST_NONCALLABLE_SPEC_OBJECT_TYPE)); |
| 4234 Branch(fail, gt, scratch, Operand(LAST_NONCALLABLE_SPEC_OBJECT_TYPE)); |
| 4235 } |
| 4236 |
| 4237 |
4220 void MacroAssembler::IsObjectJSStringType(Register object, | 4238 void MacroAssembler::IsObjectJSStringType(Register object, |
4221 Register scratch, | 4239 Register scratch, |
4222 Label* fail) { | 4240 Label* fail) { |
4223 DCHECK(kNotStringTag != 0); | 4241 DCHECK(kNotStringTag != 0); |
4224 | 4242 |
4225 ld(scratch, FieldMemOperand(object, HeapObject::kMapOffset)); | 4243 ld(scratch, FieldMemOperand(object, HeapObject::kMapOffset)); |
4226 lbu(scratch, FieldMemOperand(scratch, Map::kInstanceTypeOffset)); | 4244 lbu(scratch, FieldMemOperand(scratch, Map::kInstanceTypeOffset)); |
4227 And(scratch, scratch, Operand(kIsNotStringMask)); | 4245 And(scratch, scratch, Operand(kIsNotStringMask)); |
4228 Branch(fail, ne, scratch, Operand(zero_reg)); | 4246 Branch(fail, ne, scratch, Operand(zero_reg)); |
4229 } | 4247 } |
(...skipping 1969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6199 if (mag.shift > 0) sra(result, result, mag.shift); | 6217 if (mag.shift > 0) sra(result, result, mag.shift); |
6200 srl(at, dividend, 31); | 6218 srl(at, dividend, 31); |
6201 Addu(result, result, Operand(at)); | 6219 Addu(result, result, Operand(at)); |
6202 } | 6220 } |
6203 | 6221 |
6204 | 6222 |
6205 } // namespace internal | 6223 } // namespace internal |
6206 } // namespace v8 | 6224 } // namespace v8 |
6207 | 6225 |
6208 #endif // V8_TARGET_ARCH_MIPS64 | 6226 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |