diff options
author | Hyeongseok Oh <hseok82.oh@samsung.com> | 2017-11-01 10:41:59 +0900 |
---|---|---|
committer | Hyeongseok Oh <hseok82.oh@samsung.com> | 2017-11-01 10:41:59 +0900 |
commit | af0e5463595ed6b23af02cfddcfea971640e5d46 (patch) | |
tree | 9364e6fb2c16c2626b5320ad610af20453d1581d /src/jit/lsraarmarch.cpp | |
parent | 7ecd1b299ac89ae079b0e37cc3ffae8344308206 (diff) | |
download | coreclr-af0e5463595ed6b23af02cfddcfea971640e5d46.tar.gz coreclr-af0e5463595ed6b23af02cfddcfea971640e5d46.tar.bz2 coreclr-af0e5463595ed6b23af02cfddcfea971640e5d46.zip |
Fix slot size for transformed long
Fix slot size as 2 for transformed long from double
Use expected slot size for assertion check
Diffstat (limited to 'src/jit/lsraarmarch.cpp')
-rw-r--r-- | src/jit/lsraarmarch.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/jit/lsraarmarch.cpp b/src/jit/lsraarmarch.cpp index 08001fb9f3..b13362d5be 100644 --- a/src/jit/lsraarmarch.cpp +++ b/src/jit/lsraarmarch.cpp @@ -463,22 +463,22 @@ void LinearScan::TreeNodeInfoInitCall(GenTreeCall* call) GenTree* putArgChild = argNode->gtGetOp1(); if (!varTypeIsStruct(putArgChild) && !putArgChild->OperIs(GT_FIELD_LIST)) { + unsigned expectedSlots = 1; #ifdef _TARGET_ARM_ // The `double` types could been transformed to `long` on arm, while the actual longs // have been decomposed. - const bool isDouble = (putArgChild->TypeGet() == TYP_LONG || putArgChild->TypeGet() == TYP_DOUBLE); - if (isDouble) + if (putArgChild->TypeGet() == TYP_LONG) { argNode->gtLsraInfo.srcCount = 2; + expectedSlots = 2; + } + else if (putArgChild->TypeGet() == TYP_DOUBLE) + { + expectedSlots = 2; } - - // We must not have a multi-reg struct; double uses 2 slots and isn't a multi-reg struct - assert((curArgTabEntry->numSlots == 1) || isDouble); -#else // !_TARGET_ARM_ - // Validate the slot count for this arg. - // We must not have a multi-reg struct - assert(curArgTabEntry->numSlots == 1); #endif // !_TARGET_ARM_ + // Validate the slot count for this arg. + assert(curArgTabEntry->numSlots == expectedSlots); } continue; } |