Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: src/IceTargetLoweringX86BaseImpl.h

Issue 2076663006: Subzero: Fix frame size for floating-point register out-args. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698