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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 | 310 |
311 intptr_t position_; | 311 intptr_t position_; |
312 intptr_t unresolved_; | 312 intptr_t unresolved_; |
313 intptr_t unresolved_near_positions_[kMaxUnresolvedBranches]; | 313 intptr_t unresolved_near_positions_[kMaxUnresolvedBranches]; |
314 | 314 |
315 friend class Assembler; | 315 friend class Assembler; |
316 DISALLOW_COPY_AND_ASSIGN(Label); | 316 DISALLOW_COPY_AND_ASSIGN(Label); |
317 }; | 317 }; |
318 | 318 |
319 | 319 |
320 class CPUFeatures : public AllStatic { | |
321 public: | |
322 static void InitOnce(); | |
323 // x64 always has at least SSE2. | |
324 static bool sse2_supported() { return true; } | |
325 static bool sse4_1_supported(); | |
326 static bool double_truncate_round_supported() { return sse4_1_supported(); } | |
327 | |
328 private: | |
329 static const uint64_t kSSE4_1BitMask = static_cast<uint64_t>(1) << 51; | |
330 | |
331 static bool sse4_1_supported_; | |
332 #ifdef DEBUG | |
333 static bool initialized_; | |
334 #endif | |
335 }; | |
336 | |
337 | |
338 class Assembler : public ValueObject { | 320 class Assembler : public ValueObject { |
339 public: | 321 public: |
340 explicit Assembler(bool use_far_branches = false); | 322 explicit Assembler(bool use_far_branches = false); |
341 | 323 |
342 ~Assembler() { } | 324 ~Assembler() { } |
343 | 325 |
344 static const bool kNearJump = true; | 326 static const bool kNearJump = true; |
345 static const bool kFarJump = false; | 327 static const bool kFarJump = false; |
346 | 328 |
347 /* | 329 /* |
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1077 } | 1059 } |
1078 | 1060 |
1079 | 1061 |
1080 inline void Assembler::EmitOperandSizeOverride() { | 1062 inline void Assembler::EmitOperandSizeOverride() { |
1081 EmitUint8(0x66); | 1063 EmitUint8(0x66); |
1082 } | 1064 } |
1083 | 1065 |
1084 } // namespace dart | 1066 } // namespace dart |
1085 | 1067 |
1086 #endif // VM_ASSEMBLER_X64_H_ | 1068 #endif // VM_ASSEMBLER_X64_H_ |
OLD | NEW |