| 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 722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1070 } | 1052 } |
| 1071 | 1053 |
| 1072 | 1054 |
| 1073 inline void Assembler::EmitOperandSizeOverride() { | 1055 inline void Assembler::EmitOperandSizeOverride() { |
| 1074 EmitUint8(0x66); | 1056 EmitUint8(0x66); |
| 1075 } | 1057 } |
| 1076 | 1058 |
| 1077 } // namespace dart | 1059 } // namespace dart |
| 1078 | 1060 |
| 1079 #endif // VM_ASSEMBLER_X64_H_ | 1061 #endif // VM_ASSEMBLER_X64_H_ |
| OLD | NEW |