OLD | NEW |
1 //===- subzero/src/IceTargetLoweringX86BaseImpl.h - x86 lowering -*- C++ -*-==// | 1 //===- subzero/src/IceTargetLoweringX86BaseImpl.h - x86 lowering -*- 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 5313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5324 NewOffset += MoreOffset; | 5324 NewOffset += MoreOffset; |
5325 } | 5325 } |
5326 if (Const1) { | 5326 if (Const1) { |
5327 const int32_t MoreOffset = | 5327 const int32_t MoreOffset = |
5328 IsAdd ? Const1->getValue() : -Const1->getValue(); | 5328 IsAdd ? Const1->getValue() : -Const1->getValue(); |
5329 if (Utils::WouldOverflowAdd(*Offset + NewOffset, MoreOffset)) | 5329 if (Utils::WouldOverflowAdd(*Offset + NewOffset, MoreOffset)) |
5330 return nullptr; | 5330 return nullptr; |
5331 NewOffset += MoreOffset; | 5331 NewOffset += MoreOffset; |
5332 } | 5332 } |
5333 if (Utils::WouldOverflowAdd(*Offset, NewOffset << Shift)) | 5333 if (Utils::WouldOverflowAdd(*Offset, NewOffset << Shift)) |
5334 return nullptr; | 5334 return nullptr; |
5335 *IndexOrBase = NewIndexOrBase; | 5335 *IndexOrBase = NewIndexOrBase; |
5336 *Offset += (NewOffset << Shift); | 5336 *Offset += (NewOffset << Shift); |
5337 // Shift is always zero if this is called with the base | 5337 // Shift is always zero if this is called with the base |
5338 *Relocatable = NewRelocatable; | 5338 *Relocatable = NewRelocatable; |
5339 return Definition; | 5339 return Definition; |
5340 } | 5340 } |
5341 return nullptr; | 5341 return nullptr; |
5342 } | 5342 } |
5343 | 5343 |
5344 template <typename TypeTraits> | 5344 template <typename TypeTraits> |
(...skipping 2629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7974 emitGlobal(*Var, SectionSuffix); | 7974 emitGlobal(*Var, SectionSuffix); |
7975 } | 7975 } |
7976 } | 7976 } |
7977 } break; | 7977 } break; |
7978 } | 7978 } |
7979 } | 7979 } |
7980 } // end of namespace X86NAMESPACE | 7980 } // end of namespace X86NAMESPACE |
7981 } // end of namespace Ice | 7981 } // end of namespace Ice |
7982 | 7982 |
7983 #endif // SUBZERO_SRC_ICETARGETLOWERINGX86BASEIMPL_H | 7983 #endif // SUBZERO_SRC_ICETARGETLOWERINGX86BASEIMPL_H |
OLD | NEW |