OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef V8_ARM64_MACRO_ASSEMBLER_ARM64_INL_H_ | 5 #ifndef V8_ARM64_MACRO_ASSEMBLER_ARM64_INL_H_ |
6 #define V8_ARM64_MACRO_ASSEMBLER_ARM64_INL_H_ | 6 #define V8_ARM64_MACRO_ASSEMBLER_ARM64_INL_H_ |
7 | 7 |
8 #include <ctype.h> | 8 #include <ctype.h> |
9 | 9 |
10 #include "src/globals.h" | 10 #include "src/globals.h" |
(...skipping 1416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1427 | 1427 |
1428 | 1428 |
1429 void MacroAssembler::IsObjectNameType(Register object, | 1429 void MacroAssembler::IsObjectNameType(Register object, |
1430 Register type, | 1430 Register type, |
1431 Label* fail) { | 1431 Label* fail) { |
1432 CompareObjectType(object, type, type, LAST_NAME_TYPE); | 1432 CompareObjectType(object, type, type, LAST_NAME_TYPE); |
1433 B(hi, fail); | 1433 B(hi, fail); |
1434 } | 1434 } |
1435 | 1435 |
1436 | 1436 |
1437 void MacroAssembler::IsObjectJSObjectType(Register heap_object, | |
1438 Register map, | |
1439 Register scratch, | |
1440 Label* fail) { | |
1441 Ldr(map, FieldMemOperand(heap_object, HeapObject::kMapOffset)); | |
1442 IsInstanceJSObjectType(map, scratch, fail); | |
1443 } | |
1444 | |
1445 | |
1446 void MacroAssembler::IsInstanceJSObjectType(Register map, | |
1447 Register scratch, | |
1448 Label* fail) { | |
1449 Ldrb(scratch, FieldMemOperand(map, Map::kInstanceTypeOffset)); | |
1450 // If cmp result is lt, the following ccmp will clear all flags. | |
1451 // Z == 0, N == V implies gt condition. | |
1452 Cmp(scratch, FIRST_JS_RECEIVER_TYPE); | |
1453 Ccmp(scratch, LAST_NONCALLABLE_SPEC_OBJECT_TYPE, NoFlag, ge); | |
1454 | |
1455 // If we didn't get a valid label object just fall through and leave the | |
1456 // flags updated. | |
1457 if (fail != NULL) { | |
1458 B(gt, fail); | |
1459 } | |
1460 } | |
1461 | |
1462 | |
1463 void MacroAssembler::IsObjectJSStringType(Register object, | 1437 void MacroAssembler::IsObjectJSStringType(Register object, |
1464 Register type, | 1438 Register type, |
1465 Label* not_string, | 1439 Label* not_string, |
1466 Label* string) { | 1440 Label* string) { |
1467 Ldr(type, FieldMemOperand(object, HeapObject::kMapOffset)); | 1441 Ldr(type, FieldMemOperand(object, HeapObject::kMapOffset)); |
1468 Ldrb(type.W(), FieldMemOperand(type, Map::kInstanceTypeOffset)); | 1442 Ldrb(type.W(), FieldMemOperand(type, Map::kInstanceTypeOffset)); |
1469 | 1443 |
1470 STATIC_ASSERT(kStringTag == 0); | 1444 STATIC_ASSERT(kStringTag == 0); |
1471 DCHECK((string != NULL) || (not_string != NULL)); | 1445 DCHECK((string != NULL) || (not_string != NULL)); |
1472 if (string == NULL) { | 1446 if (string == NULL) { |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1680 DCHECK(isprint(marker_name[0]) && isprint(marker_name[1])); | 1654 DCHECK(isprint(marker_name[0]) && isprint(marker_name[1])); |
1681 | 1655 |
1682 InstructionAccurateScope scope(this, 1); | 1656 InstructionAccurateScope scope(this, 1); |
1683 movn(xzr, (marker_name[1] << 8) | marker_name[0]); | 1657 movn(xzr, (marker_name[1] << 8) | marker_name[0]); |
1684 } | 1658 } |
1685 | 1659 |
1686 } // namespace internal | 1660 } // namespace internal |
1687 } // namespace v8 | 1661 } // namespace v8 |
1688 | 1662 |
1689 #endif // V8_ARM64_MACRO_ASSEMBLER_ARM64_INL_H_ | 1663 #endif // V8_ARM64_MACRO_ASSEMBLER_ARM64_INL_H_ |
OLD | NEW |