| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef VM_ASSEMBLER_ARM_H_ | 5 #ifndef VM_ASSEMBLER_ARM_H_ |
| 6 #define VM_ASSEMBLER_ARM_H_ | 6 #define VM_ASSEMBLER_ARM_H_ |
| 7 | 7 |
| 8 #ifndef VM_ASSEMBLER_H_ | 8 #ifndef VM_ASSEMBLER_H_ |
| 9 #error Do not include assembler_arm.h directly; use assembler.h instead. | 9 #error Do not include assembler_arm.h directly; use assembler.h instead. |
| 10 #endif | 10 #endif |
| (...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 635 void IntegerDivide(Register result, Register left, Register right, | 635 void IntegerDivide(Register result, Register left, Register right, |
| 636 DRegister tmpl, DRegister tmpr); | 636 DRegister tmpl, DRegister tmpr); |
| 637 | 637 |
| 638 // If we aren't on ARMv7, there is no smull. | 638 // If we aren't on ARMv7, there is no smull. |
| 639 void CheckMultSignedOverflow(Register left, | 639 void CheckMultSignedOverflow(Register left, |
| 640 Register right, | 640 Register right, |
| 641 Register tmp, | 641 Register tmp, |
| 642 DRegister dtmp0, DRegister dtmp1, | 642 DRegister dtmp0, DRegister dtmp1, |
| 643 Label* overflow); | 643 Label* overflow); |
| 644 | 644 |
| 645 // Load and Store. May clobber IP. | 645 // Load and Store. |
| 646 // These three do not clobber IP. |
| 646 void LoadPatchableImmediate(Register rd, int32_t value, Condition cond = AL); | 647 void LoadPatchableImmediate(Register rd, int32_t value, Condition cond = AL); |
| 647 void LoadDecodableImmediate(Register rd, int32_t value, Condition cond = AL); | 648 void LoadDecodableImmediate(Register rd, int32_t value, Condition cond = AL); |
| 648 void LoadImmediate(Register rd, int32_t value, Condition cond = AL); | 649 void LoadImmediate(Register rd, int32_t value, Condition cond = AL); |
| 650 // These two may clobber IP. |
| 649 void LoadSImmediate(SRegister sd, float value, Condition cond = AL); | 651 void LoadSImmediate(SRegister sd, float value, Condition cond = AL); |
| 650 void LoadDImmediate(DRegister dd, double value, | 652 void LoadDImmediate(DRegister dd, double value, |
| 651 Register scratch, Condition cond = AL); | 653 Register scratch, Condition cond = AL); |
| 652 | 654 |
| 653 void MarkExceptionHandler(Label* label); | 655 void MarkExceptionHandler(Label* label); |
| 654 | 656 |
| 655 void Drop(intptr_t stack_elements); | 657 void Drop(intptr_t stack_elements); |
| 656 | 658 |
| 657 void LoadPoolPointer(); | 659 void LoadPoolPointer(); |
| 658 | 660 |
| 659 void LoadIsolate(Register rd); | 661 void LoadIsolate(Register rd); |
| 660 | 662 |
| 661 void LoadObject(Register rd, const Object& object, Condition cond = AL); | 663 void LoadObject(Register rd, const Object& object, Condition cond = AL); |
| 662 void PushObject(const Object& object); | 664 void PushObject(const Object& object); |
| 663 void CompareObject(Register rn, const Object& object); | 665 void CompareObject(Register rn, const Object& object); |
| 664 | 666 |
| 667 // When storing into a heap object field, knowledge of the previous content |
| 668 // is expressed through these constants. |
| 669 enum FieldContent { |
| 670 kEmptyOrSmiOrNull, // Empty = garbage/zapped in release/debug mode. |
| 671 kHeapObjectOrSmi, |
| 672 kOnlySmi, |
| 673 }; |
| 674 |
| 665 void StoreIntoObject(Register object, // Object we are storing into. | 675 void StoreIntoObject(Register object, // Object we are storing into. |
| 666 const Address& dest, // Where we are storing into. | 676 const Address& dest, // Where we are storing into. |
| 667 Register value, // Value we are storing. | 677 Register value, // Value we are storing. |
| 668 bool can_value_be_smi = true); | 678 bool can_value_be_smi = true); |
| 669 void StoreIntoObjectOffset(Register object, | 679 void StoreIntoObjectOffset(Register object, |
| 670 int32_t offset, | 680 int32_t offset, |
| 671 Register value, | 681 Register value, |
| 672 bool can_value_be_smi = true); | 682 bool can_value_be_smi = true); |
| 673 | 683 |
| 674 void StoreIntoObjectNoBarrier(Register object, | 684 void StoreIntoObjectNoBarrier(Register object, |
| 675 const Address& dest, | 685 const Address& dest, |
| 676 Register value); | 686 Register value, |
| 677 void StoreIntoObjectNoBarrierOffset(Register object, | 687 FieldContent old_content = kHeapObjectOrSmi); |
| 678 int32_t offset, | 688 void InitializeFieldNoBarrier(Register object, |
| 679 Register value); | 689 const Address& dest, |
| 690 Register value) { |
| 691 StoreIntoObjectNoBarrier(object, dest, value, kEmptyOrSmiOrNull); |
| 692 } |
| 693 void StoreIntoObjectNoBarrierOffset( |
| 694 Register object, |
| 695 int32_t offset, |
| 696 Register value, |
| 697 FieldContent old_content = kHeapObjectOrSmi); |
| 680 void StoreIntoObjectNoBarrier(Register object, | 698 void StoreIntoObjectNoBarrier(Register object, |
| 681 const Address& dest, | 699 const Address& dest, |
| 682 const Object& value); | 700 const Object& value, |
| 683 void StoreIntoObjectNoBarrierOffset(Register object, | 701 FieldContent old_content = kHeapObjectOrSmi); |
| 684 int32_t offset, | 702 void StoreIntoObjectNoBarrierOffset( |
| 685 const Object& value); | 703 Register object, |
| 704 int32_t offset, |
| 705 const Object& value, |
| 706 FieldContent old_content = kHeapObjectOrSmi); |
| 686 | 707 |
| 687 // Store value_even, value_odd, value_even, ... into the words in the address | 708 // Store value_even, value_odd, value_even, ... into the words in the address |
| 688 // range [begin, end), assumed to be uninitialized fields in object (tagged). | 709 // range [begin, end), assumed to be uninitialized fields in object (tagged). |
| 689 // The stores must not need a generational store barrier (e.g., smi/null), | 710 // The stores must not need a generational store barrier (e.g., smi/null), |
| 690 // and (value_even, value_odd) must be a valid register pair. | 711 // and (value_even, value_odd) must be a valid register pair. |
| 691 // Destroys register 'begin'. | 712 // Destroys register 'begin'. |
| 692 void InitializeFieldsNoBarrier(Register object, | 713 void InitializeFieldsNoBarrier(Register object, |
| 693 Register begin, | 714 Register begin, |
| 694 Register end, | 715 Register end, |
| 695 Register value_even, | 716 Register value_even, |
| (...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1089 intptr_t offset, | 1110 intptr_t offset, |
| 1090 Register value, | 1111 Register value, |
| 1091 Condition cond = AL); | 1112 Condition cond = AL); |
| 1092 void WriteShadowedFieldPair(Register base, | 1113 void WriteShadowedFieldPair(Register base, |
| 1093 intptr_t offset, | 1114 intptr_t offset, |
| 1094 Register value_even, | 1115 Register value_even, |
| 1095 Register value_odd, | 1116 Register value_odd, |
| 1096 Condition cond = AL); | 1117 Condition cond = AL); |
| 1097 // Writes new_value to address and its shadow location, if enabled, after | 1118 // Writes new_value to address and its shadow location, if enabled, after |
| 1098 // verifying that its old value matches its shadow. | 1119 // verifying that its old value matches its shadow. |
| 1099 void VerifiedWrite(const Address& address, Register new_value); | 1120 void VerifiedWrite(const Address& address, |
| 1121 Register new_value, |
| 1122 FieldContent old_content); |
| 1100 | 1123 |
| 1101 DISALLOW_ALLOCATION(); | 1124 DISALLOW_ALLOCATION(); |
| 1102 DISALLOW_COPY_AND_ASSIGN(Assembler); | 1125 DISALLOW_COPY_AND_ASSIGN(Assembler); |
| 1103 }; | 1126 }; |
| 1104 | 1127 |
| 1105 } // namespace dart | 1128 } // namespace dart |
| 1106 | 1129 |
| 1107 #endif // VM_ASSEMBLER_ARM_H_ | 1130 #endif // VM_ASSEMBLER_ARM_H_ |
| OLD | NEW |