| 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 939 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 950 // bit-manipulation problems below. | 950 // bit-manipulation problems below. |
| 951 AlignmentParam = std::max(AlignmentParam, 1u); | 951 AlignmentParam = std::max(AlignmentParam, 1u); |
| 952 | 952 |
| 953 // LLVM enforces power of 2 alignment. | 953 // LLVM enforces power of 2 alignment. |
| 954 assert(llvm::isPowerOf2_32(AlignmentParam)); | 954 assert(llvm::isPowerOf2_32(AlignmentParam)); |
| 955 assert(llvm::isPowerOf2_32(Traits::X86_STACK_ALIGNMENT_BYTES)); | 955 assert(llvm::isPowerOf2_32(Traits::X86_STACK_ALIGNMENT_BYTES)); |
| 956 | 956 |
| 957 uint32_t Alignment = | 957 uint32_t Alignment = |
| 958 std::max(AlignmentParam, Traits::X86_STACK_ALIGNMENT_BYTES); | 958 std::max(AlignmentParam, Traits::X86_STACK_ALIGNMENT_BYTES); |
| 959 if (Alignment > Traits::X86_STACK_ALIGNMENT_BYTES) { | 959 if (Alignment > Traits::X86_STACK_ALIGNMENT_BYTES) { |
| 960 IsEbpBasedFrame = true; | |
| 961 _and(esp, Ctx->getConstantInt32(-Alignment)); | 960 _and(esp, Ctx->getConstantInt32(-Alignment)); |
| 962 } | 961 } |
| 963 if (const auto *ConstantTotalSize = | 962 if (const auto *ConstantTotalSize = |
| 964 llvm::dyn_cast<ConstantInteger32>(TotalSize)) { | 963 llvm::dyn_cast<ConstantInteger32>(TotalSize)) { |
| 965 uint32_t Value = ConstantTotalSize->getValue(); | 964 uint32_t Value = ConstantTotalSize->getValue(); |
| 966 Value = Utils::applyAlignment(Value, Alignment); | 965 Value = Utils::applyAlignment(Value, Alignment); |
| 967 if (Inst->getKnownFrameOffset()) { | 966 if (Inst->getKnownFrameOffset()) { |
| 968 _adjust_stack(Value); | 967 _adjust_stack(Value); |
| 969 FixedAllocaSizeBytes += Value; | 968 FixedAllocaSizeBytes += Value; |
| 970 } else { | 969 } else { |
| (...skipping 4890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5861 } | 5860 } |
| 5862 // the offset is not eligible for blinding or pooling, return the original | 5861 // the offset is not eligible for blinding or pooling, return the original |
| 5863 // mem operand | 5862 // mem operand |
| 5864 return MemOperand; | 5863 return MemOperand; |
| 5865 } | 5864 } |
| 5866 | 5865 |
| 5867 } // end of namespace X86Internal | 5866 } // end of namespace X86Internal |
| 5868 } // end of namespace Ice | 5867 } // end of namespace Ice |
| 5869 | 5868 |
| 5870 #endif // SUBZERO_SRC_ICETARGETLOWERINGX86BASEIMPL_H | 5869 #endif // SUBZERO_SRC_ICETARGETLOWERINGX86BASEIMPL_H |
| OLD | NEW |