| 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 memmove(&encoding_[0], &other.encoding_[0], other.length_); | 84 memmove(&encoding_[0], &other.encoding_[0], other.length_); |
| 85 } | 85 } |
| 86 | 86 |
| 87 Operand& operator=(const Operand& other) { | 87 Operand& operator=(const Operand& other) { |
| 88 length_ = other.length_; | 88 length_ = other.length_; |
| 89 rex_ = other.rex_; | 89 rex_ = other.rex_; |
| 90 memmove(&encoding_[0], &other.encoding_[0], other.length_); | 90 memmove(&encoding_[0], &other.encoding_[0], other.length_); |
| 91 return *this; | 91 return *this; |
| 92 } | 92 } |
| 93 | 93 |
| 94 bool Equals(const Operand& other) { | 94 bool Equals(const Operand& other) const { |
| 95 if (length_ != other.length_) return false; | 95 if (length_ != other.length_) return false; |
| 96 if (rex_ != other.rex_) return false; | 96 if (rex_ != other.rex_) return false; |
| 97 for (uint8_t i = 0; i < length_; i++) { | 97 for (uint8_t i = 0; i < length_; i++) { |
| 98 if (encoding_[i] != other.encoding_[i]) return false; | 98 if (encoding_[i] != other.encoding_[i]) return false; |
| 99 } | 99 } |
| 100 return true; | 100 return true; |
| 101 } | 101 } |
| 102 | 102 |
| 103 protected: | 103 protected: |
| 104 Operand() : length_(0), rex_(REX_NONE) { } // Needed by subclass Address. | 104 Operand() : length_(0), rex_(REX_NONE) { } // Needed by subclass Address. |
| (...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 923 } | 923 } |
| 924 | 924 |
| 925 | 925 |
| 926 inline void Assembler::EmitOperandSizeOverride() { | 926 inline void Assembler::EmitOperandSizeOverride() { |
| 927 EmitUint8(0x66); | 927 EmitUint8(0x66); |
| 928 } | 928 } |
| 929 | 929 |
| 930 } // namespace dart | 930 } // namespace dart |
| 931 | 931 |
| 932 #endif // VM_ASSEMBLER_X64_H_ | 932 #endif // VM_ASSEMBLER_X64_H_ |
| OLD | NEW |