Chromium Code Reviews| 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 ~Assembler() { } | 315 ~Assembler() { } |
|
regis
2013/07/31 18:01:12
You could add an ASSERT(!use_far_branches) with a
zra
2013/07/31 20:10:52
Done.
| |
| 316 | 316 |
| 317 static const bool kNearJump = true; | 317 static const bool kNearJump = true; |
| 318 static const bool kFarJump = false; | 318 static const bool kFarJump = false; |
| 319 | 319 |
| 320 /* | 320 /* |
| 321 * Emit Machine Instructions. | 321 * Emit Machine Instructions. |
| 322 */ | 322 */ |
| 323 void call(Register reg); | 323 void call(Register reg); |
| 324 void call(const Address& address); | 324 void call(const Address& address); |
| 325 void call(Label* label); | 325 void call(Label* label); |
| (...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 850 } | 850 } |
| 851 | 851 |
| 852 | 852 |
| 853 inline void Assembler::EmitOperandSizeOverride() { | 853 inline void Assembler::EmitOperandSizeOverride() { |
| 854 EmitUint8(0x66); | 854 EmitUint8(0x66); |
| 855 } | 855 } |
| 856 | 856 |
| 857 } // namespace dart | 857 } // namespace dart |
| 858 | 858 |
| 859 #endif // VM_ASSEMBLER_IA32_H_ | 859 #endif // VM_ASSEMBLER_IA32_H_ |
| OLD | NEW |