OLD | NEW |
1 //===- subzero/src/IceTargetLoweringX8664Traits.h - x86-64 traits -*- C++ -*-=// | 1 //===- subzero/src/IceTargetLoweringX8664Traits.h - x86-64 traits -*- 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 /// \file | 10 /// \file |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 (encoding_at(1) & 7)); | 125 (encoding_at(1) & 7)); |
126 } | 126 } |
127 | 127 |
128 int8_t disp8() const { | 128 int8_t disp8() const { |
129 assert(length_ >= 2); | 129 assert(length_ >= 2); |
130 return static_cast<int8_t>(encoding_[length_ - 1]); | 130 return static_cast<int8_t>(encoding_[length_ - 1]); |
131 } | 131 } |
132 | 132 |
133 int32_t disp32() const { | 133 int32_t disp32() const { |
134 assert(length_ >= 5); | 134 assert(length_ >= 5); |
135 return bit_copy<int32_t>(encoding_[length_ - 4]); | 135 // TODO(stichnot): This method is not currently used. Delete it along |
| 136 // with other unused methods, or use a safe version of bitCopy(). |
| 137 llvm::report_fatal_error("Unexpected call to disp32()"); |
| 138 // return Utils::bitCopy<int32_t>(encoding_[length_ - 4]); |
136 } | 139 } |
137 | 140 |
138 AssemblerFixup *fixup() const { return fixup_; } | 141 AssemblerFixup *fixup() const { return fixup_; } |
139 | 142 |
140 protected: | 143 protected: |
141 Operand() : fixup_(nullptr), length_(0) {} // Needed by subclass Address. | 144 Operand() : fixup_(nullptr), length_(0) {} // Needed by subclass Address. |
142 | 145 |
143 void SetModRM(int mod, GPRRegister rm) { | 146 void SetModRM(int mod, GPRRegister rm) { |
144 assert((mod & ~3) == 0); | 147 assert((mod & ~3) == 0); |
145 encoding_[0] = (mod << 6) | (rm & 0x07); | 148 encoding_[0] = (mod << 6) | (rm & 0x07); |
(...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
979 const char *FldString; // s, l, or <blank> | 982 const char *FldString; // s, l, or <blank> |
980 } TypeAttributes[]; | 983 } TypeAttributes[]; |
981 }; | 984 }; |
982 | 985 |
983 using Traits = ::Ice::X8664::TargetX8664Traits; | 986 using Traits = ::Ice::X8664::TargetX8664Traits; |
984 } // end of namespace X8664 | 987 } // end of namespace X8664 |
985 | 988 |
986 } // end of namespace Ice | 989 } // end of namespace Ice |
987 | 990 |
988 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8664TRAITS_H | 991 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8664TRAITS_H |
OLD | NEW |