diff options
author | Carol Eidt <carol.eidt@microsoft.com> | 2016-09-21 17:47:00 -0700 |
---|---|---|
committer | Carol Eidt <carol.eidt@microsoft.com> | 2016-09-21 17:47:00 -0700 |
commit | f0a50665caeac5bc43207ea22301a5274a1bcca9 (patch) | |
tree | b77d76431163122454546c62a6a3e7a2c8fafdc9 | |
parent | f490d4dd10fb0d891f8b080078f5c5156885789c (diff) | |
download | coreclr-f0a50665caeac5bc43207ea22301a5274a1bcca9.tar.gz coreclr-f0a50665caeac5bc43207ea22301a5274a1bcca9.tar.bz2 coreclr-f0a50665caeac5bc43207ea22301a5274a1bcca9.zip |
DynBlk assert fixes for Arm64
In the case where the block size is not a constant, there were some incorrect asserts. The size register is on the size node itself, the node is a store, and the check for whether the size is a handle used to be guarded by a check that it is GT_CNS_INT, but since it was really intended to assert that there are no gc pointers, according to the comment on the old code, it doesn't really seem to be a useful assert (we could never get a size node in that case, in the new IR form).
-rw-r--r-- | src/jit/codegenarm64.cpp | 4 | ||||
-rw-r--r-- | src/jit/lowerarm64.cpp | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/jit/codegenarm64.cpp b/src/jit/codegenarm64.cpp index 742e0dfe6c..d3cb1039fd 100644 --- a/src/jit/codegenarm64.cpp +++ b/src/jit/codegenarm64.cpp @@ -4339,10 +4339,10 @@ void CodeGen::genCodeForCpBlk(GenTreeBlk* cpBlkNode) assert(!dstAddr->isContained()); assert(!srcAddr->isContained()); - assert(cpBlkNode->gtRsvdRegs == RBM_ARG_2); if (blockSize != 0) { + assert(cpBlkNode->gtRsvdRegs == RBM_ARG_2); #if 0 // Enable this when we support cpblk loop unrolling. @@ -4353,7 +4353,7 @@ void CodeGen::genCodeForCpBlk(GenTreeBlk* cpBlkNode) } else { - noway_assert(cpBlkNode->gtOper == GT_DYN_BLK); + noway_assert(cpBlkNode->gtOper == GT_STORE_DYN_BLK); genConsumeRegAndCopy(cpBlkNode->AsDynBlk()->gtDynamicSize, REG_ARG_2); } genConsumeRegAndCopy(srcAddr, REG_ARG_1); diff --git a/src/jit/lowerarm64.cpp b/src/jit/lowerarm64.cpp index 7c6164f963..9d6e78f5c2 100644 --- a/src/jit/lowerarm64.cpp +++ b/src/jit/lowerarm64.cpp @@ -1282,7 +1282,7 @@ void Lowering::TreeNodeInfoInitBlockStore(GenTreeBlk* blkNode) else #endif // 0 { - // The helper follows the regular AMD64 ABI. + // The helper follows the regular ABI. dstAddr->gtLsraInfo.setSrcCandidates(l, RBM_ARG_0); initVal->gtLsraInfo.setSrcCandidates(l, RBM_ARG_1); blkNode->gtBlkOpKind = GenTreeBlk::BlkOpKindHelper; @@ -1447,7 +1447,6 @@ void Lowering::TreeNodeInfoInitBlockStore(GenTreeBlk* blkNode) noway_assert(blkNode->gtOper == GT_STORE_DYN_BLK); blkNode->gtLsraInfo.setSrcCount(3); GenTree* blockSize = blkNode->AsDynBlk()->gtDynamicSize; - assert(!blockSize->IsIconHandle()); blockSize->gtLsraInfo.setSrcCandidates(l, RBM_ARG_2); } blkNode->gtBlkOpKind = GenTreeBlk::BlkOpKindHelper; |