| 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 7001 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7012 uint32_t TargetX86Base<TraitsType>::getCallStackArgumentsSizeBytes( | 7012 uint32_t TargetX86Base<TraitsType>::getCallStackArgumentsSizeBytes( |
| 7013 const CfgVector<Type> &ArgTypes, Type ReturnType) { | 7013 const CfgVector<Type> &ArgTypes, Type ReturnType) { |
| 7014 uint32_t OutArgumentsSizeBytes = 0; | 7014 uint32_t OutArgumentsSizeBytes = 0; |
| 7015 uint32_t XmmArgCount = 0; | 7015 uint32_t XmmArgCount = 0; |
| 7016 uint32_t GprArgCount = 0; | 7016 uint32_t GprArgCount = 0; |
| 7017 for (Type Ty : ArgTypes) { | 7017 for (Type Ty : ArgTypes) { |
| 7018 // The PNaCl ABI requires the width of arguments to be at least 32 bits. | 7018 // The PNaCl ABI requires the width of arguments to be at least 32 bits. |
| 7019 assert(typeWidthInBytes(Ty) >= 4); | 7019 assert(typeWidthInBytes(Ty) >= 4); |
| 7020 if (isVectorType(Ty) && XmmArgCount < Traits::X86_MAX_XMM_ARGS) { | 7020 if (isVectorType(Ty) && XmmArgCount < Traits::X86_MAX_XMM_ARGS) { |
| 7021 ++XmmArgCount; | 7021 ++XmmArgCount; |
| 7022 } else if (isScalarFloatingType(Ty) && Traits::X86_PASS_SCALAR_FP_IN_XMM && |
| 7023 XmmArgCount < Traits::X86_MAX_XMM_ARGS) { |
| 7024 ++XmmArgCount; |
| 7022 } else if (isScalarIntegerType(Ty) && | 7025 } else if (isScalarIntegerType(Ty) && |
| 7023 GprArgCount < Traits::X86_MAX_GPR_ARGS) { | 7026 GprArgCount < Traits::X86_MAX_GPR_ARGS) { |
| 7024 // The 64 bit ABI allows some integers to be passed in GPRs. | 7027 // The 64 bit ABI allows some integers to be passed in GPRs. |
| 7025 ++GprArgCount; | 7028 ++GprArgCount; |
| 7026 } else { | 7029 } else { |
| 7027 if (isVectorType(Ty)) { | 7030 if (isVectorType(Ty)) { |
| 7028 OutArgumentsSizeBytes = | 7031 OutArgumentsSizeBytes = |
| 7029 Traits::applyStackAlignment(OutArgumentsSizeBytes); | 7032 Traits::applyStackAlignment(OutArgumentsSizeBytes); |
| 7030 } | 7033 } |
| 7031 OutArgumentsSizeBytes += typeWidthInBytesOnStack(Ty); | 7034 OutArgumentsSizeBytes += typeWidthInBytesOnStack(Ty); |
| (...skipping 934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7966 emitGlobal(*Var, SectionSuffix); | 7969 emitGlobal(*Var, SectionSuffix); |
| 7967 } | 7970 } |
| 7968 } | 7971 } |
| 7969 } break; | 7972 } break; |
| 7970 } | 7973 } |
| 7971 } | 7974 } |
| 7972 } // end of namespace X86NAMESPACE | 7975 } // end of namespace X86NAMESPACE |
| 7973 } // end of namespace Ice | 7976 } // end of namespace Ice |
| 7974 | 7977 |
| 7975 #endif // SUBZERO_SRC_ICETARGETLOWERINGX86BASEIMPL_H | 7978 #endif // SUBZERO_SRC_ICETARGETLOWERINGX86BASEIMPL_H |
| OLD | NEW |