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_ARM | 7 #if V8_TARGET_ARCH_ARM |
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 1372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1383 void MacroAssembler::InvokeFunction(Handle<JSFunction> function, | 1383 void MacroAssembler::InvokeFunction(Handle<JSFunction> function, |
1384 const ParameterCount& expected, | 1384 const ParameterCount& expected, |
1385 const ParameterCount& actual, | 1385 const ParameterCount& actual, |
1386 InvokeFlag flag, | 1386 InvokeFlag flag, |
1387 const CallWrapper& call_wrapper) { | 1387 const CallWrapper& call_wrapper) { |
1388 Move(r1, function); | 1388 Move(r1, function); |
1389 InvokeFunction(r1, expected, actual, flag, call_wrapper); | 1389 InvokeFunction(r1, expected, actual, flag, call_wrapper); |
1390 } | 1390 } |
1391 | 1391 |
1392 | 1392 |
| 1393 void MacroAssembler::IsObjectJSObjectType(Register heap_object, |
| 1394 Register map, |
| 1395 Register scratch, |
| 1396 Label* fail) { |
| 1397 ldr(map, FieldMemOperand(heap_object, HeapObject::kMapOffset)); |
| 1398 IsInstanceJSObjectType(map, scratch, fail); |
| 1399 } |
| 1400 |
| 1401 |
| 1402 void MacroAssembler::IsInstanceJSObjectType(Register map, |
| 1403 Register scratch, |
| 1404 Label* fail) { |
| 1405 ldrb(scratch, FieldMemOperand(map, Map::kInstanceTypeOffset)); |
| 1406 cmp(scratch, Operand(FIRST_NONCALLABLE_SPEC_OBJECT_TYPE)); |
| 1407 b(lt, fail); |
| 1408 cmp(scratch, Operand(LAST_NONCALLABLE_SPEC_OBJECT_TYPE)); |
| 1409 b(gt, fail); |
| 1410 } |
| 1411 |
| 1412 |
1393 void MacroAssembler::IsObjectJSStringType(Register object, | 1413 void MacroAssembler::IsObjectJSStringType(Register object, |
1394 Register scratch, | 1414 Register scratch, |
1395 Label* fail) { | 1415 Label* fail) { |
1396 DCHECK(kNotStringTag != 0); | 1416 DCHECK(kNotStringTag != 0); |
1397 | 1417 |
1398 ldr(scratch, FieldMemOperand(object, HeapObject::kMapOffset)); | 1418 ldr(scratch, FieldMemOperand(object, HeapObject::kMapOffset)); |
1399 ldrb(scratch, FieldMemOperand(scratch, Map::kInstanceTypeOffset)); | 1419 ldrb(scratch, FieldMemOperand(scratch, Map::kInstanceTypeOffset)); |
1400 tst(scratch, Operand(kIsNotStringMask)); | 1420 tst(scratch, Operand(kIsNotStringMask)); |
1401 b(ne, fail); | 1421 b(ne, fail); |
1402 } | 1422 } |
(...skipping 2370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3773 } | 3793 } |
3774 } | 3794 } |
3775 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); | 3795 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); |
3776 add(result, result, Operand(dividend, LSR, 31)); | 3796 add(result, result, Operand(dividend, LSR, 31)); |
3777 } | 3797 } |
3778 | 3798 |
3779 } // namespace internal | 3799 } // namespace internal |
3780 } // namespace v8 | 3800 } // namespace v8 |
3781 | 3801 |
3782 #endif // V8_TARGET_ARCH_ARM | 3802 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |