[RyuJIT/ARM32] Avoid assersion for double arguments
authorJiyoung Yun <jy910.yun@samsung.com>
Tue, 20 Jun 2017 09:43:44 +0000 (18:43 +0900)
committerJiyoung Yun <jy910.yun@samsung.com>
Wed, 21 Jun 2017 02:07:15 +0000 (11:07 +0900)
Double arguments in ARM32 uses 2 slots and it isn't a multi-reg struct.
In this case, it should avoid an assersion that checks if the slot is 1.

src/jit/lsraarmarch.cpp

index 9b75e8e..9b9ea30 100644 (file)
@@ -711,17 +711,15 @@ void Lowering::TreeNodeInfoInitPutArgStk(GenTreePutArgStk* argNode, fgArgTabEntr
             MakeSrcContained(argNode, putArgChild);
         }
     }
-#ifdef _TARGET_ARM_
-    else if (putArgChild->TypeGet() == TYP_DOUBLE) {
-        // Even though TYP_DOUBLE uses 2 numSlots, we consume 1 srcCount in TYP_DOUBLE
-        argNode->gtLsraInfo.srcCount = 1;
-        putArgChild->SetContained();
-    }
-#endif
     else
     {
+#ifdef _TARGET_ARM_
+        // We must not have a multi-reg strcut; double uses 2 slots and isn't a multi-reg struct
+        assert((info->numSlots == 1) || ((info->numSlots == 2) && (putArgChild->TypeGet() == TYP_DOUBLE)));
+#else // !_TARGET_ARM_
         // We must not have a multi-reg struct
         assert(info->numSlots == 1);
+#endif // !_TARGET_ARM_
     }
 }