| 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_IA32_H_ | 5 #ifndef VM_ASSEMBLER_IA32_H_ |
| 6 #define VM_ASSEMBLER_IA32_H_ | 6 #define VM_ASSEMBLER_IA32_H_ |
| 7 | 7 |
| 8 #ifndef VM_ASSEMBLER_H_ | 8 #ifndef 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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 | 279 |
| 280 intptr_t position_; | 280 intptr_t position_; |
| 281 intptr_t unresolved_; | 281 intptr_t unresolved_; |
| 282 intptr_t unresolved_near_positions_[kMaxUnresolvedBranches]; | 282 intptr_t unresolved_near_positions_[kMaxUnresolvedBranches]; |
| 283 | 283 |
| 284 friend class Assembler; | 284 friend class Assembler; |
| 285 DISALLOW_COPY_AND_ASSIGN(Label); | 285 DISALLOW_COPY_AND_ASSIGN(Label); |
| 286 }; | 286 }; |
| 287 | 287 |
| 288 | 288 |
| 289 class CPUFeatures : public AllStatic { |
| 290 public: |
| 291 static void InitOnce(); |
| 292 static bool sse2_supported(); |
| 293 static bool sse4_1_supported(); |
| 294 static bool double_truncate_round_supported() { return sse4_1_supported(); } |
| 295 |
| 296 private: |
| 297 static const uint64_t kSSE2BitMask = static_cast<uint64_t>(1) << 26; |
| 298 static const uint64_t kSSE4_1BitMask = static_cast<uint64_t>(1) << 51; |
| 299 |
| 300 static bool sse2_supported_; |
| 301 static bool sse4_1_supported_; |
| 302 #ifdef DEBUG |
| 303 static bool initialized_; |
| 304 #endif |
| 305 }; |
| 306 |
| 307 |
| 289 class Assembler : public ValueObject { | 308 class Assembler : public ValueObject { |
| 290 public: | 309 public: |
| 291 explicit Assembler(bool use_far_branches = false) | 310 explicit Assembler(bool use_far_branches = false) |
| 292 : buffer_(), | 311 : buffer_(), |
| 293 object_pool_(GrowableObjectArray::Handle()), | 312 object_pool_(GrowableObjectArray::Handle()), |
| 294 prologue_offset_(-1), | 313 prologue_offset_(-1), |
| 295 jit_cookie_(0), | 314 jit_cookie_(0), |
| 296 comments_() { | 315 comments_() { |
| 297 // This mode is only needed and implemented for MIPS and ARM. | 316 // This mode is only needed and implemented for MIPS and ARM. |
| 298 ASSERT(!use_far_branches); | 317 ASSERT(!use_far_branches); |
| (...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 887 } | 906 } |
| 888 | 907 |
| 889 | 908 |
| 890 inline void Assembler::EmitOperandSizeOverride() { | 909 inline void Assembler::EmitOperandSizeOverride() { |
| 891 EmitUint8(0x66); | 910 EmitUint8(0x66); |
| 892 } | 911 } |
| 893 | 912 |
| 894 } // namespace dart | 913 } // namespace dart |
| 895 | 914 |
| 896 #endif // VM_ASSEMBLER_IA32_H_ | 915 #endif // VM_ASSEMBLER_IA32_H_ |
| OLD | NEW |