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 // Modified by the Subzero authors. | 5 // Modified by the Subzero authors. |
6 // | 6 // |
7 //===- subzero/src/assembler_ia32.h - Assembler for x86-32 ----------------===// | 7 //===- subzero/src/assembler_ia32.h - Assembler for x86-32 ----------------===// |
8 // | 8 // |
9 // The Subzero Code Generator | 9 // The Subzero Code Generator |
10 // | 10 // |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 intptr_t disp_size = sizeof(disp); | 150 intptr_t disp_size = sizeof(disp); |
151 memmove(&encoding_[length_], &disp, disp_size); | 151 memmove(&encoding_[length_], &disp, disp_size); |
152 length_ += disp_size; | 152 length_ += disp_size; |
153 } | 153 } |
154 | 154 |
155 void SetFixup(AssemblerFixup *fixup) { fixup_ = fixup; } | 155 void SetFixup(AssemblerFixup *fixup) { fixup_ = fixup; } |
156 | 156 |
157 private: | 157 private: |
158 uint8_t length_; | 158 uint8_t length_; |
159 uint8_t encoding_[6]; | 159 uint8_t encoding_[6]; |
160 uint8_t padding_; | |
161 AssemblerFixup *fixup_; | 160 AssemblerFixup *fixup_; |
162 | 161 |
163 explicit Operand(GPRRegister reg) : fixup_(NULL) { SetModRM(3, reg); } | 162 explicit Operand(GPRRegister reg) : fixup_(NULL) { SetModRM(3, reg); } |
164 | 163 |
165 // Get the operand encoding byte at the given index. | 164 // Get the operand encoding byte at the given index. |
166 uint8_t encoding_at(intptr_t index) const { | 165 uint8_t encoding_at(intptr_t index) const { |
167 assert(index >= 0 && index < length_); | 166 assert(index >= 0 && index < length_); |
168 return encoding_[index]; | 167 return encoding_[index]; |
169 } | 168 } |
170 | 169 |
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
745 inline void AssemblerX86::EmitFixup(AssemblerFixup *fixup) { | 744 inline void AssemblerX86::EmitFixup(AssemblerFixup *fixup) { |
746 buffer_.EmitFixup(fixup); | 745 buffer_.EmitFixup(fixup); |
747 } | 746 } |
748 | 747 |
749 inline void AssemblerX86::EmitOperandSizeOverride() { EmitUint8(0x66); } | 748 inline void AssemblerX86::EmitOperandSizeOverride() { EmitUint8(0x66); } |
750 | 749 |
751 } // end of namespace x86 | 750 } // end of namespace x86 |
752 } // end of namespace Ice | 751 } // end of namespace Ice |
753 | 752 |
754 #endif // SUBZERO_SRC_ASSEMBLER_IA32_H_ | 753 #endif // SUBZERO_SRC_ASSEMBLER_IA32_H_ |
OLD | NEW |