| OLD | NEW |
| 1 //===- subzero/src/IceFixups.h - Assembler fixup kinds ----------*- C++ -*-===// | 1 //===- subzero/src/IceFixups.h - Assembler fixup kinds ----------*- C++ -*-===// |
| 2 // | 2 // |
| 3 // The Subzero Code Generator | 3 // The Subzero Code Generator |
| 4 // | 4 // |
| 5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
| 6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
| 7 // | 7 // |
| 8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
| 9 // | 9 /// |
| 10 // This file declares generic fixup types. | 10 /// \file |
| 11 // | 11 /// This file declares generic fixup types. |
| 12 /// |
| 12 //===----------------------------------------------------------------------===// | 13 //===----------------------------------------------------------------------===// |
| 13 | 14 |
| 14 #ifndef SUBZERO_SRC_ICEFIXUPS_H | 15 #ifndef SUBZERO_SRC_ICEFIXUPS_H |
| 15 #define SUBZERO_SRC_ICEFIXUPS_H | 16 #define SUBZERO_SRC_ICEFIXUPS_H |
| 16 | 17 |
| 17 #include "IceDefs.h" | 18 #include "IceDefs.h" |
| 18 | 19 |
| 19 namespace Ice { | 20 namespace Ice { |
| 20 | 21 |
| 21 // Each target and container format has a different namespace of relocations. | 22 /// Each target and container format has a different namespace of relocations. |
| 22 // This holds the specific target+container format's relocation number. | 23 /// This holds the specific target+container format's relocation number. |
| 23 typedef uint32_t FixupKind; | 24 typedef uint32_t FixupKind; |
| 24 | 25 |
| 25 // Assembler fixups are positions in generated code/data that hold relocation | 26 /// Assembler fixups are positions in generated code/data that hold relocation |
| 26 // information that needs to be processed before finalizing the code/data. | 27 /// information that needs to be processed before finalizing the code/data. |
| 27 struct AssemblerFixup { | 28 struct AssemblerFixup { |
| 28 AssemblerFixup &operator=(const AssemblerFixup &) = delete; | 29 AssemblerFixup &operator=(const AssemblerFixup &) = delete; |
| 29 | 30 |
| 30 public: | 31 public: |
| 31 AssemblerFixup() = default; | 32 AssemblerFixup() = default; |
| 32 AssemblerFixup(const AssemblerFixup &) = default; | 33 AssemblerFixup(const AssemblerFixup &) = default; |
| 33 intptr_t position() const { return position_; } | 34 intptr_t position() const { return position_; } |
| 34 void set_position(intptr_t Position) { position_ = Position; } | 35 void set_position(intptr_t Position) { position_ = Position; } |
| 35 | 36 |
| 36 FixupKind kind() const { return kind_; } | 37 FixupKind kind() const { return kind_; } |
| (...skipping 14 matching lines...) Expand all Loading... |
| 51 FixupKind kind_ = 0; | 52 FixupKind kind_ = 0; |
| 52 const Constant *value_ = nullptr; | 53 const Constant *value_ = nullptr; |
| 53 }; | 54 }; |
| 54 | 55 |
| 55 typedef std::vector<AssemblerFixup> FixupList; | 56 typedef std::vector<AssemblerFixup> FixupList; |
| 56 typedef std::vector<AssemblerFixup *> FixupRefList; | 57 typedef std::vector<AssemblerFixup *> FixupRefList; |
| 57 | 58 |
| 58 } // end of namespace Ice | 59 } // end of namespace Ice |
| 59 | 60 |
| 60 #endif // SUBZERO_SRC_ICEFIXUPS_H | 61 #endif // SUBZERO_SRC_ICEFIXUPS_H |
| OLD | NEW |