| 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 |
| 864 void Align(int alignment, intptr_t offset); | 869 void Align(int alignment, intptr_t offset); |
| 865 void Bind(Label* label); | 870 void Bind(Label* label); |
| 866 void Jump(Label* label) { jmp(label); } | 871 void Jump(Label* label) { jmp(label); } |
| 867 | 872 |
| 868 void Comment(const char* format, ...) PRINTF_ATTRIBUTE(2, 3); | 873 void Comment(const char* format, ...) PRINTF_ATTRIBUTE(2, 3); |
| 869 static bool EmittingComments(); | 874 static bool EmittingComments(); |
| 870 | 875 |
| 871 const Code::Comments& GetCodeComments() const; | 876 const Code::Comments& GetCodeComments() const; |
| 872 | 877 |
| 873 // Address of code at offset. | 878 // Address of code at offset. |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1160 } | 1165 } |
| 1161 | 1166 |
| 1162 | 1167 |
| 1163 inline void Assembler::EmitOperandSizeOverride() { | 1168 inline void Assembler::EmitOperandSizeOverride() { |
| 1164 EmitUint8(0x66); | 1169 EmitUint8(0x66); |
| 1165 } | 1170 } |
| 1166 | 1171 |
| 1167 } // namespace dart | 1172 } // namespace dart |
| 1168 | 1173 |
| 1169 #endif // VM_ASSEMBLER_X64_H_ | 1174 #endif // VM_ASSEMBLER_X64_H_ |
| OLD | NEW |