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 |
770 void Align(intptr_t alignment, intptr_t offset); | 775 void Align(intptr_t alignment, intptr_t offset); |
771 void Bind(Label* label); | 776 void Bind(Label* label); |
772 void Jump(Label* label) { jmp(label); } | 777 void Jump(Label* label) { jmp(label); } |
773 | 778 |
774 // Address of code at offset. | 779 // Address of code at offset. |
775 uword CodeAddress(intptr_t offset) { | 780 uword CodeAddress(intptr_t offset) { |
776 return buffer_.Address(offset); | 781 return buffer_.Address(offset); |
777 } | 782 } |
778 | 783 |
779 intptr_t CodeSize() const { return buffer_.Size(); } | 784 intptr_t CodeSize() const { return buffer_.Size(); } |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1014 } | 1019 } |
1015 | 1020 |
1016 | 1021 |
1017 inline void Assembler::EmitOperandSizeOverride() { | 1022 inline void Assembler::EmitOperandSizeOverride() { |
1018 EmitUint8(0x66); | 1023 EmitUint8(0x66); |
1019 } | 1024 } |
1020 | 1025 |
1021 } // namespace dart | 1026 } // namespace dart |
1022 | 1027 |
1023 #endif // VM_ASSEMBLER_IA32_H_ | 1028 #endif // VM_ASSEMBLER_IA32_H_ |
OLD | NEW |