| 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 2134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2145 Variable *esp = getPhysicalRegister(getStackReg(), Traits::WordType); | 2145 Variable *esp = getPhysicalRegister(getStackReg(), Traits::WordType); |
| 2146 Constant *Loc = Ctx->getConstantInt32(ParameterAreaSizeBytes); | 2146 Constant *Loc = Ctx->getConstantInt32(ParameterAreaSizeBytes); |
| 2147 StackArgLocations.push_back( | 2147 StackArgLocations.push_back( |
| 2148 Traits::X86OperandMem::create(Func, Ty, esp, Loc)); | 2148 Traits::X86OperandMem::create(Func, Ty, esp, Loc)); |
| 2149 ParameterAreaSizeBytes += typeWidthInBytesOnStack(Arg->getType()); | 2149 ParameterAreaSizeBytes += typeWidthInBytesOnStack(Arg->getType()); |
| 2150 } | 2150 } |
| 2151 } | 2151 } |
| 2152 // Ensure there is enough space for the fstp/movs for floating returns. | 2152 // Ensure there is enough space for the fstp/movs for floating returns. |
| 2153 Variable *Dest = Instr->getDest(); | 2153 Variable *Dest = Instr->getDest(); |
| 2154 const Type DestTy = Dest ? Dest->getType() : IceType_void; | 2154 const Type DestTy = Dest ? Dest->getType() : IceType_void; |
| 2155 if (Traits::X86_PASS_SCALAR_FP_IN_XMM) { | 2155 if (!Traits::X86_PASS_SCALAR_FP_IN_XMM) { |
| 2156 if (isScalarFloatingType(DestTy)) { | 2156 if (isScalarFloatingType(DestTy)) { |
| 2157 ParameterAreaSizeBytes = | 2157 ParameterAreaSizeBytes = |
| 2158 std::max(static_cast<size_t>(ParameterAreaSizeBytes), | 2158 std::max(static_cast<size_t>(ParameterAreaSizeBytes), |
| 2159 typeWidthInBytesOnStack(DestTy)); | 2159 typeWidthInBytesOnStack(DestTy)); |
| 2160 } | 2160 } |
| 2161 } | 2161 } |
| 2162 // Adjust the parameter area so that the stack is aligned. It is assumed that | 2162 // Adjust the parameter area so that the stack is aligned. It is assumed that |
| 2163 // the stack is already aligned at the start of the calling sequence. | 2163 // the stack is already aligned at the start of the calling sequence. |
| 2164 ParameterAreaSizeBytes = Traits::applyStackAlignment(ParameterAreaSizeBytes); | 2164 ParameterAreaSizeBytes = Traits::applyStackAlignment(ParameterAreaSizeBytes); |
| 2165 assert(ParameterAreaSizeBytes <= maxOutArgsSizeBytes()); | 2165 assert(ParameterAreaSizeBytes <= maxOutArgsSizeBytes()); |
| (...skipping 4732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6898 Func, MemOperand->getType(), RegTemp, nullptr, MemOperand->getIndex(), | 6898 Func, MemOperand->getType(), RegTemp, nullptr, MemOperand->getIndex(), |
| 6899 MemOperand->getShift(), MemOperand->getSegmentRegister()); | 6899 MemOperand->getShift(), MemOperand->getSegmentRegister()); |
| 6900 return NewMemOperand; | 6900 return NewMemOperand; |
| 6901 } | 6901 } |
| 6902 } | 6902 } |
| 6903 } | 6903 } |
| 6904 } // end of namespace X86NAMESPACE | 6904 } // end of namespace X86NAMESPACE |
| 6905 } // end of namespace Ice | 6905 } // end of namespace Ice |
| 6906 | 6906 |
| 6907 #endif // SUBZERO_SRC_ICETARGETLOWERINGX86BASEIMPL_H | 6907 #endif // SUBZERO_SRC_ICETARGETLOWERINGX86BASEIMPL_H |
| OLD | NEW |