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 RUNTIME_VM_ASSEMBLER_IA32_H_ | 5 #ifndef RUNTIME_VM_ASSEMBLER_IA32_H_ |
6 #define RUNTIME_VM_ASSEMBLER_IA32_H_ | 6 #define RUNTIME_VM_ASSEMBLER_IA32_H_ |
7 | 7 |
8 #ifndef RUNTIME_VM_ASSEMBLER_H_ | 8 #ifndef RUNTIME_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 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
753 */ | 753 */ |
754 void SmiTag(Register reg) { addl(reg, reg); } | 754 void SmiTag(Register reg) { addl(reg, reg); } |
755 | 755 |
756 void SmiUntag(Register reg) { sarl(reg, Immediate(kSmiTagSize)); } | 756 void SmiUntag(Register reg) { sarl(reg, Immediate(kSmiTagSize)); } |
757 | 757 |
758 void BranchIfNotSmi(Register reg, Label* label) { | 758 void BranchIfNotSmi(Register reg, Label* label) { |
759 testl(reg, Immediate(kSmiTagMask)); | 759 testl(reg, Immediate(kSmiTagMask)); |
760 j(NOT_ZERO, label); | 760 j(NOT_ZERO, label); |
761 } | 761 } |
762 | 762 |
| 763 void BranchIfSmi(Register reg, Label* label) { |
| 764 testl(reg, Immediate(kSmiTagMask)); |
| 765 j(ZERO, label); |
| 766 } |
| 767 |
763 void Align(intptr_t alignment, intptr_t offset); | 768 void Align(intptr_t alignment, intptr_t offset); |
764 void Bind(Label* label); | 769 void Bind(Label* label); |
765 void Jump(Label* label) { jmp(label); } | 770 void Jump(Label* label) { jmp(label); } |
766 | 771 |
767 // Address of code at offset. | 772 // Address of code at offset. |
768 uword CodeAddress(intptr_t offset) { return buffer_.Address(offset); } | 773 uword CodeAddress(intptr_t offset) { return buffer_.Address(offset); } |
769 | 774 |
770 intptr_t CodeSize() const { return buffer_.Size(); } | 775 intptr_t CodeSize() const { return buffer_.Size(); } |
771 intptr_t prologue_offset() const { return prologue_offset_; } | 776 intptr_t prologue_offset() const { return prologue_offset_; } |
772 bool has_single_entry_point() const { return true; } | 777 bool has_single_entry_point() const { return true; } |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1002 } | 1007 } |
1003 | 1008 |
1004 | 1009 |
1005 inline void Assembler::EmitOperandSizeOverride() { | 1010 inline void Assembler::EmitOperandSizeOverride() { |
1006 EmitUint8(0x66); | 1011 EmitUint8(0x66); |
1007 } | 1012 } |
1008 | 1013 |
1009 } // namespace dart | 1014 } // namespace dart |
1010 | 1015 |
1011 #endif // RUNTIME_VM_ASSEMBLER_IA32_H_ | 1016 #endif // RUNTIME_VM_ASSEMBLER_IA32_H_ |
OLD | NEW |