| 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 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 static bool sse2_supported_; | 300 static bool sse2_supported_; |
| 301 static bool sse4_1_supported_; | 301 static bool sse4_1_supported_; |
| 302 #ifdef DEBUG | 302 #ifdef DEBUG |
| 303 static bool initialized_; | 303 static bool initialized_; |
| 304 #endif | 304 #endif |
| 305 }; | 305 }; |
| 306 | 306 |
| 307 | 307 |
| 308 class Assembler : public ValueObject { | 308 class Assembler : public ValueObject { |
| 309 public: | 309 public: |
| 310 Assembler() | 310 explicit Assembler(bool use_far_branches = false) |
| 311 : buffer_(), | 311 : buffer_(), |
| 312 object_pool_(GrowableObjectArray::Handle()), | 312 object_pool_(GrowableObjectArray::Handle()), |
| 313 prologue_offset_(-1), | 313 prologue_offset_(-1), |
| 314 comments_() { } | 314 comments_() { |
| 315 // This mode is only needed and implemented for MIPS and ARM. |
| 316 ASSERT(!use_far_branches); |
| 317 } |
| 315 ~Assembler() { } | 318 ~Assembler() { } |
| 316 | 319 |
| 317 static const bool kNearJump = true; | 320 static const bool kNearJump = true; |
| 318 static const bool kFarJump = false; | 321 static const bool kFarJump = false; |
| 319 | 322 |
| 320 /* | 323 /* |
| 321 * Emit Machine Instructions. | 324 * Emit Machine Instructions. |
| 322 */ | 325 */ |
| 323 void call(Register reg); | 326 void call(Register reg); |
| 324 void call(const Address& address); | 327 void call(const Address& address); |
| (...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 853 } | 856 } |
| 854 | 857 |
| 855 | 858 |
| 856 inline void Assembler::EmitOperandSizeOverride() { | 859 inline void Assembler::EmitOperandSizeOverride() { |
| 857 EmitUint8(0x66); | 860 EmitUint8(0x66); |
| 858 } | 861 } |
| 859 | 862 |
| 860 } // namespace dart | 863 } // namespace dart |
| 861 | 864 |
| 862 #endif // VM_ASSEMBLER_IA32_H_ | 865 #endif // VM_ASSEMBLER_IA32_H_ |
| OLD | NEW |