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 749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
760 * Misc. functionality | 760 * Misc. functionality |
761 */ | 761 */ |
762 void SmiTag(Register reg) { | 762 void SmiTag(Register reg) { |
763 addl(reg, reg); | 763 addl(reg, reg); |
764 } | 764 } |
765 | 765 |
766 void SmiUntag(Register reg) { | 766 void SmiUntag(Register reg) { |
767 sarl(reg, Immediate(kSmiTagSize)); | 767 sarl(reg, Immediate(kSmiTagSize)); |
768 } | 768 } |
769 | 769 |
770 void BranchIfNotSmi(Register reg, Label* label) { | |
771 testl(reg, Immediate(kSmiTagMask)); | |
772 j(NOT_ZERO, label); | |
773 } | |
774 | |
775 void Align(intptr_t alignment, intptr_t offset); | 770 void Align(intptr_t alignment, intptr_t offset); |
776 void Bind(Label* label); | 771 void Bind(Label* label); |
777 void Jump(Label* label) { jmp(label); } | 772 void Jump(Label* label) { jmp(label); } |
778 | 773 |
779 // Address of code at offset. | 774 // Address of code at offset. |
780 uword CodeAddress(intptr_t offset) { | 775 uword CodeAddress(intptr_t offset) { |
781 return buffer_.Address(offset); | 776 return buffer_.Address(offset); |
782 } | 777 } |
783 | 778 |
784 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... |
1019 } | 1014 } |
1020 | 1015 |
1021 | 1016 |
1022 inline void Assembler::EmitOperandSizeOverride() { | 1017 inline void Assembler::EmitOperandSizeOverride() { |
1023 EmitUint8(0x66); | 1018 EmitUint8(0x66); |
1024 } | 1019 } |
1025 | 1020 |
1026 } // namespace dart | 1021 } // namespace dart |
1027 | 1022 |
1028 #endif // VM_ASSEMBLER_IA32_H_ | 1023 #endif // VM_ASSEMBLER_IA32_H_ |
OLD | NEW |