OLD | NEW |
1 //===- subzero/src/assembler_ia32.h - Assembler for x86-32 ------*- C++ -*-===// | 1 //===- subzero/src/assembler_ia32.h - Assembler for x86-32 ------*- C++ -*-===// |
2 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 2 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
3 // for details. All rights reserved. Use of this source code is governed by a | 3 // for details. All rights reserved. Use of this source code is governed by a |
4 // BSD-style license that can be found in the LICENSE file. | 4 // BSD-style license that can be found in the LICENSE file. |
5 // | 5 // |
6 // Modified by the Subzero authors. | 6 // Modified by the Subzero authors. |
7 // | 7 // |
8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
9 // | 9 // |
10 // The Subzero Code Generator | 10 // The Subzero Code Generator |
(...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
823 | 823 |
824 void FinalizeInstructions(const MemoryRegion ®ion) { | 824 void FinalizeInstructions(const MemoryRegion ®ion) { |
825 buffer_.FinalizeInstructions(region); | 825 buffer_.FinalizeInstructions(region); |
826 } | 826 } |
827 | 827 |
828 // Expose the buffer, for bringup... | 828 // Expose the buffer, for bringup... |
829 intptr_t GetPosition() const { return buffer_.GetPosition(); } | 829 intptr_t GetPosition() const { return buffer_.GetPosition(); } |
830 template <typename T> T LoadBuffer(intptr_t position) const { | 830 template <typename T> T LoadBuffer(intptr_t position) const { |
831 return buffer_.Load<T>(position); | 831 return buffer_.Load<T>(position); |
832 } | 832 } |
833 AssemblerFixup *GetLatestFixup() const { return buffer_.GetLatestFixup(); } | 833 AssemblerFixup *GetLatestFixup(intptr_t position) const { |
| 834 return buffer_.GetLatestFixup(position); |
| 835 } |
834 | 836 |
835 private: | 837 private: |
836 inline void EmitUint8(uint8_t value); | 838 inline void EmitUint8(uint8_t value); |
837 inline void EmitInt16(int16_t value); | 839 inline void EmitInt16(int16_t value); |
838 inline void EmitInt32(int32_t value); | 840 inline void EmitInt32(int32_t value); |
839 inline void EmitRegisterOperand(int rm, int reg); | 841 inline void EmitRegisterOperand(int rm, int reg); |
840 inline void EmitXmmRegisterOperand(int rm, XmmRegister reg); | 842 inline void EmitXmmRegisterOperand(int rm, XmmRegister reg); |
841 inline void EmitFixup(AssemblerFixup *fixup); | 843 inline void EmitFixup(AssemblerFixup *fixup); |
842 inline void EmitOperandSizeOverride(); | 844 inline void EmitOperandSizeOverride(); |
843 | 845 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
890 inline void AssemblerX86::EmitFixup(AssemblerFixup *fixup) { | 892 inline void AssemblerX86::EmitFixup(AssemblerFixup *fixup) { |
891 buffer_.EmitFixup(fixup); | 893 buffer_.EmitFixup(fixup); |
892 } | 894 } |
893 | 895 |
894 inline void AssemblerX86::EmitOperandSizeOverride() { EmitUint8(0x66); } | 896 inline void AssemblerX86::EmitOperandSizeOverride() { EmitUint8(0x66); } |
895 | 897 |
896 } // end of namespace x86 | 898 } // end of namespace x86 |
897 } // end of namespace Ice | 899 } // end of namespace Ice |
898 | 900 |
899 #endif // SUBZERO_SRC_ASSEMBLER_IA32_H_ | 901 #endif // SUBZERO_SRC_ASSEMBLER_IA32_H_ |
OLD | NEW |