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_X64_H_ | 5 #ifndef VM_ASSEMBLER_X64_H_ |
6 #define VM_ASSEMBLER_X64_H_ | 6 #define VM_ASSEMBLER_X64_H_ |
7 | 7 |
8 #ifndef VM_ASSEMBLER_H_ | 8 #ifndef VM_ASSEMBLER_H_ |
9 #error Do not include assembler_x64.h directly; use assembler.h instead. | 9 #error Do not include assembler_x64.h directly; use assembler.h instead. |
10 #endif | 10 #endif |
(...skipping 843 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
854 * Misc. functionality. | 854 * Misc. functionality. |
855 */ | 855 */ |
856 void SmiTag(Register reg) { | 856 void SmiTag(Register reg) { |
857 addq(reg, reg); | 857 addq(reg, reg); |
858 } | 858 } |
859 | 859 |
860 void SmiUntag(Register reg) { | 860 void SmiUntag(Register reg) { |
861 sarq(reg, Immediate(kSmiTagSize)); | 861 sarq(reg, Immediate(kSmiTagSize)); |
862 } | 862 } |
863 | 863 |
864 void BranchIfNotSmi(Register reg, Label* label) { | |
865 testq(reg, Immediate(kSmiTagMask)); | |
866 j(NOT_ZERO, label); | |
867 } | |
868 | |
869 void Align(int alignment, intptr_t offset); | 864 void Align(int alignment, intptr_t offset); |
870 void Bind(Label* label); | 865 void Bind(Label* label); |
871 void Jump(Label* label) { jmp(label); } | 866 void Jump(Label* label) { jmp(label); } |
872 | 867 |
873 void Comment(const char* format, ...) PRINTF_ATTRIBUTE(2, 3); | 868 void Comment(const char* format, ...) PRINTF_ATTRIBUTE(2, 3); |
874 static bool EmittingComments(); | 869 static bool EmittingComments(); |
875 | 870 |
876 const Code::Comments& GetCodeComments() const; | 871 const Code::Comments& GetCodeComments() const; |
877 | 872 |
878 // Address of code at offset. | 873 // Address of code at offset. |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1165 } | 1160 } |
1166 | 1161 |
1167 | 1162 |
1168 inline void Assembler::EmitOperandSizeOverride() { | 1163 inline void Assembler::EmitOperandSizeOverride() { |
1169 EmitUint8(0x66); | 1164 EmitUint8(0x66); |
1170 } | 1165 } |
1171 | 1166 |
1172 } // namespace dart | 1167 } // namespace dart |
1173 | 1168 |
1174 #endif // VM_ASSEMBLER_X64_H_ | 1169 #endif // VM_ASSEMBLER_X64_H_ |
OLD | NEW |