diff options
author | Bruce Forstall <brucefo@microsoft.com> | 2017-12-01 14:57:24 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-01 14:57:24 -0800 |
commit | 49afb352748ffc2f3272b3c9f62426b0e95a93d7 (patch) | |
tree | 5bd0659a2ab1e045c808527d05d875f40b68cfa7 /src/jit/codegencommon.cpp | |
parent | 600902ddd4f11172e1befa64925c2394852063ef (diff) | |
parent | f78693ead5f5840f3d443a4fb1975e6d46bc9dd4 (diff) | |
download | coreclr-49afb352748ffc2f3272b3c9f62426b0e95a93d7.tar.gz coreclr-49afb352748ffc2f3272b3c9f62426b0e95a93d7.tar.bz2 coreclr-49afb352748ffc2f3272b3c9f62426b0e95a93d7.zip |
Merge pull request #15270 from sdmaclea/PR-ARM64-JITSTRESS-lvaStressLclFldCB
[ARM64] Align Compiler::lvaStressLclFldCB padding
Diffstat (limited to 'src/jit/codegencommon.cpp')
-rw-r--r-- | src/jit/codegencommon.cpp | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/src/jit/codegencommon.cpp b/src/jit/codegencommon.cpp index acdc7fad2b..c741a668c3 100644 --- a/src/jit/codegencommon.cpp +++ b/src/jit/codegencommon.cpp @@ -1684,7 +1684,7 @@ void CodeGen::genAdjustStackLevel(BasicBlock* block) #endif // !FEATURE_FIXED_OUT_ARGS } -#ifdef _TARGET_ARM_ +#ifdef _TARGET_ARMARCH_ // return size // alignmentWB is out param unsigned CodeGenInterface::InferOpSizeAlign(GenTreePtr op, unsigned* alignmentWB) @@ -1724,7 +1724,8 @@ unsigned CodeGenInterface::InferStructOpSizeAlign(GenTreePtr op, unsigned* align { CORINFO_CLASS_HANDLE clsHnd = op->AsObj()->gtClass; opSize = compiler->info.compCompHnd->getClassSize(clsHnd); - alignment = roundUp(compiler->info.compCompHnd->getClassAlignmentRequirement(clsHnd), TARGET_POINTER_SIZE); + alignment = + (unsigned)roundUp(compiler->info.compCompHnd->getClassAlignmentRequirement(clsHnd), TARGET_POINTER_SIZE); } else if (op->gtOper == GT_LCL_VAR) { @@ -1732,11 +1733,13 @@ unsigned CodeGenInterface::InferStructOpSizeAlign(GenTreePtr op, unsigned* align LclVarDsc* varDsc = compiler->lvaTable + varNum; assert(varDsc->lvType == TYP_STRUCT); opSize = varDsc->lvSize(); +#ifndef _TARGET_64BIT_ if (varDsc->lvStructDoubleAlign) { alignment = TARGET_POINTER_SIZE * 2; } else +#endif // !_TARGET_64BIT_ { alignment = TARGET_POINTER_SIZE; } @@ -1750,13 +1753,13 @@ unsigned CodeGenInterface::InferStructOpSizeAlign(GenTreePtr op, unsigned* align if (op2->IsIconHandle(GTF_ICON_CLASS_HDL)) { CORINFO_CLASS_HANDLE clsHnd = (CORINFO_CLASS_HANDLE)op2->gtIntCon.gtIconVal; - opSize = roundUp(compiler->info.compCompHnd->getClassSize(clsHnd), TARGET_POINTER_SIZE); - alignment = - roundUp(compiler->info.compCompHnd->getClassAlignmentRequirement(clsHnd), TARGET_POINTER_SIZE); + opSize = (unsigned)roundUp(compiler->info.compCompHnd->getClassSize(clsHnd), TARGET_POINTER_SIZE); + alignment = (unsigned)roundUp(compiler->info.compCompHnd->getClassAlignmentRequirement(clsHnd), + TARGET_POINTER_SIZE); } else { - opSize = op2->gtIntCon.gtIconVal; + opSize = (unsigned)op2->gtIntCon.gtIconVal; GenTreePtr op1 = op->gtOp.gtOp1; assert(op1->OperGet() == GT_LIST); GenTreePtr dstAddr = op1->gtOp.gtOp1; @@ -1787,8 +1790,9 @@ unsigned CodeGenInterface::InferStructOpSizeAlign(GenTreePtr op, unsigned* align { CORINFO_CLASS_HANDLE clsHnd = op->gtArgPlace.gtArgPlaceClsHnd; assert(clsHnd != 0); - opSize = roundUp(compiler->info.compCompHnd->getClassSize(clsHnd), TARGET_POINTER_SIZE); - alignment = roundUp(compiler->info.compCompHnd->getClassAlignmentRequirement(clsHnd), TARGET_POINTER_SIZE); + opSize = (unsigned)roundUp(compiler->info.compCompHnd->getClassSize(clsHnd), TARGET_POINTER_SIZE); + alignment = + (unsigned)roundUp(compiler->info.compCompHnd->getClassAlignmentRequirement(clsHnd), TARGET_POINTER_SIZE); } else { @@ -1804,7 +1808,7 @@ unsigned CodeGenInterface::InferStructOpSizeAlign(GenTreePtr op, unsigned* align return opSize; } -#endif // _TARGET_ARM_ +#endif // _TARGET_ARMARCH_ /***************************************************************************** * |