| 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_IA32_H_ | 5 #ifndef VM_ASSEMBLER_IA32_H_ |
| 6 #define VM_ASSEMBLER_IA32_H_ | 6 #define VM_ASSEMBLER_IA32_H_ |
| 7 | 7 |
| 8 #ifndef VM_ASSEMBLER_H_ | 8 #ifndef VM_ASSEMBLER_H_ |
| 9 #error Do not include assembler_ia32.h directly; use assembler.h instead. | 9 #error Do not include assembler_ia32.h directly; use assembler.h instead. |
| 10 #endif | 10 #endif |
| (...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 733 void CompareClassId(Register object, intptr_t class_id, Register scratch); | 733 void CompareClassId(Register object, intptr_t class_id, Register scratch); |
| 734 | 734 |
| 735 void LoadClassIdMayBeSmi(Register result, Register object); | 735 void LoadClassIdMayBeSmi(Register result, Register object); |
| 736 void LoadTaggedClassIdMayBeSmi(Register result, Register object); | 736 void LoadTaggedClassIdMayBeSmi(Register result, Register object); |
| 737 | 737 |
| 738 void SmiUntagOrCheckClass(Register object, | 738 void SmiUntagOrCheckClass(Register object, |
| 739 intptr_t class_id, | 739 intptr_t class_id, |
| 740 Register scratch, | 740 Register scratch, |
| 741 Label* is_smi); | 741 Label* is_smi); |
| 742 | 742 |
| 743 void ComputeRange(Register result, | |
| 744 Register value, | |
| 745 Register lo_temp, | |
| 746 Register hi_temp, | |
| 747 Label* miss); | |
| 748 | |
| 749 void UpdateRangeFeedback(Register value, | |
| 750 intptr_t index, | |
| 751 Register ic_data, | |
| 752 Register scratch1, | |
| 753 Register scratch2, | |
| 754 Register scratch3, | |
| 755 Label* miss); | |
| 756 | |
| 757 static Address ElementAddressForIntIndex(bool is_external, | 743 static Address ElementAddressForIntIndex(bool is_external, |
| 758 intptr_t cid, | 744 intptr_t cid, |
| 759 intptr_t index_scale, | 745 intptr_t index_scale, |
| 760 Register array, | 746 Register array, |
| 761 intptr_t index); | 747 intptr_t index); |
| 762 | 748 |
| 763 static Address ElementAddressForRegIndex(bool is_external, | 749 static Address ElementAddressForRegIndex(bool is_external, |
| 764 intptr_t cid, | 750 intptr_t cid, |
| 765 intptr_t index_scale, | 751 intptr_t index_scale, |
| 766 Register array, | 752 Register array, |
| 767 Register index); | 753 Register index); |
| 768 | 754 |
| 769 static Address VMTagAddress() { | 755 static Address VMTagAddress() { |
| 770 return Address(THR, Thread::vm_tag_offset()); | 756 return Address(THR, Thread::vm_tag_offset()); |
| 771 } | 757 } |
| 772 | 758 |
| 773 /* | 759 /* |
| 774 * Misc. functionality | 760 * Misc. functionality |
| 775 */ | 761 */ |
| 776 void SmiTag(Register reg) { | 762 void SmiTag(Register reg) { |
| 777 addl(reg, reg); | 763 addl(reg, reg); |
| 778 } | 764 } |
| 779 | 765 |
| 780 void SmiUntag(Register reg) { | 766 void SmiUntag(Register reg) { |
| 781 sarl(reg, Immediate(kSmiTagSize)); | 767 sarl(reg, Immediate(kSmiTagSize)); |
| 782 } | 768 } |
| 783 | 769 |
| 784 intptr_t PreferredLoopAlignment() { return 16; } | |
| 785 void Align(intptr_t alignment, intptr_t offset); | 770 void Align(intptr_t alignment, intptr_t offset); |
| 786 void Bind(Label* label); | 771 void Bind(Label* label); |
| 787 void Jump(Label* label) { jmp(label); } | 772 void Jump(Label* label) { jmp(label); } |
| 788 | 773 |
| 789 // Address of code at offset. | 774 // Address of code at offset. |
| 790 uword CodeAddress(intptr_t offset) { | 775 uword CodeAddress(intptr_t offset) { |
| 791 return buffer_.Address(offset); | 776 return buffer_.Address(offset); |
| 792 } | 777 } |
| 793 | 778 |
| 794 intptr_t CodeSize() const { return buffer_.Size(); } | 779 intptr_t CodeSize() const { return buffer_.Size(); } |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1029 } | 1014 } |
| 1030 | 1015 |
| 1031 | 1016 |
| 1032 inline void Assembler::EmitOperandSizeOverride() { | 1017 inline void Assembler::EmitOperandSizeOverride() { |
| 1033 EmitUint8(0x66); | 1018 EmitUint8(0x66); |
| 1034 } | 1019 } |
| 1035 | 1020 |
| 1036 } // namespace dart | 1021 } // namespace dart |
| 1037 | 1022 |
| 1038 #endif // VM_ASSEMBLER_IA32_H_ | 1023 #endif // VM_ASSEMBLER_IA32_H_ |
| OLD | NEW |