Tests and fixes for struct16 arguments and floating point arguments
authorBrian Sullivan <briansul@microsoft.com>
Fri, 18 Mar 2016 23:58:50 +0000 (16:58 -0700)
committerBrian Sullivan <briansul@microsoft.com>
Mon, 21 Mar 2016 18:22:06 +0000 (11:22 -0700)
Updated Tests.lst with 50 new passing tests
Updated this fix to be under #ifdef ARM64 only

src/jit/morph.cpp
tests/arm64/Tests.lst
tests/src/JIT/CodeGenBringUpTests/struct16args.cs [new file with mode: 0644]
tests/src/JIT/CodeGenBringUpTests/struct16args.csproj [new file with mode: 0644]

index 23ee8f3ffcd2d679a6f008bd51fcce92035e9d94..fb9585a38cd8de1d72e5c8574d21605f8e8ff384 100644 (file)
@@ -2587,13 +2587,11 @@ GenTreeCall* Compiler::fgMorphArgs(GenTreeCall* callNode)
     regMaskTP       fltArgSkippedRegMask = RBM_NONE;
 #endif
 
-#if defined(_TARGET_AMD64_) || defined(_TARGET_ARM64_)
-    // On x64, every argument takes up exactly 1 slot, regardless of type.
-    // Only the first 4 slots are enregistered.
-    const unsigned  maxRegArgs    = MAX_REG_ARG;
-#elif defined(_TARGET_X86_)
-    unsigned        maxRegArgs    = MAX_REG_ARG;
-#endif
+#if defined(_TARGET_X86_)
+    unsigned        maxRegArgs    = MAX_REG_ARG;  // X86: non-const, must be calculated
+#else
+    const unsigned  maxRegArgs    = MAX_REG_ARG;  // other arch: fixed constant number 
+#endif 
 
     unsigned        argSlots          = 0;
     unsigned        nonRegPassedStructSlots = 0;
@@ -3124,12 +3122,12 @@ GenTreeCall* Compiler::fgMorphArgs(GenTreeCall* callNode)
                     {
                         size = 1;  // Large structs are passed by reference (to a copy)
                     }
-                    // TODO-ARM64-NYI:  There are some additional rules for size=2 structs,
+                    // Note that there are some additional rules for size=2 structs,
                     // (i.e they cannot be split betwen registers and the stack)
                 }
                 else
                 {
-                    size = 1; // On ARM64, all primitives fit in a single (64-bit) 'slot'
+                    size = 1; // On ARM64, all primitive types fit in a single (64-bit) 'slot'
                 }
 #elif defined(_TARGET_ARM_)
                 if (isStructArg)
@@ -3415,7 +3413,7 @@ GenTreeCall* Compiler::fgMorphArgs(GenTreeCall* callNode)
                 }
             }
 
-            // This size has now been computed
+            // The 'size' value has now must have been set. (the original value of zero is an invalid value)
             assert(size != 0);
 
             //
@@ -3468,7 +3466,19 @@ GenTreeCall* Compiler::fgMorphArgs(GenTreeCall* callNode)
                 {
                     isRegArg = intArgRegNum < MAX_REG_ARG;
                 }
-#else // _TARGET_ARM_
+#elif _TARGET_ARM64_
+                if (passUsingFloatRegs)
+                {
+                    // Check if the last register needed is still in the fp argument register range.
+                    isRegArg = (nextFltArgRegNum + (size - 1)) < MAX_FLOAT_REG_ARG;
+                }
+                else
+                {
+                    // Check if the last register needed is still in the int argument register range.
+                    isRegArg = (intArgRegNum + (size - 1)) < maxRegArgs;
+                }
+#else // not _TARGET_ARM_ or _TARGET_ARM64_
+
 #if defined(UNIX_AMD64_ABI)
 
 #if defined(FEATURE_UNIX_AMD64_STRUCT_PASSING)
index 950e4bdc7777e24b6b3f6926d16c7db188f31036..f1d2a6dd2c2049198fb225ef010b00d480aab944 100644 (file)
@@ -9573,14 +9573,14 @@ RelativePath=JIT\IL_Conformance\Old\directed\ldarg_s_r4\ldarg_s_r4.exe
 WorkingDir=JIT\IL_Conformance\Old\directed\ldarg_s_r4
 Expected=100
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL;NEW_PASS
+Categories=Pri0;EXPECTED_PASS
 HostStyle=Any
 [ldarg_s_r8.exe_1368]
 RelativePath=JIT\IL_Conformance\Old\directed\ldarg_s_r8\ldarg_s_r8.exe
 WorkingDir=JIT\IL_Conformance\Old\directed\ldarg_s_r8
 Expected=100
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL;NEW_PASS
+Categories=Pri0;EXPECTED_PASS
 HostStyle=Any
 [ldloca_s_i1.exe_1369]
 RelativePath=JIT\IL_Conformance\Old\directed\ldloca_s_i1\ldloca_s_i1.exe
@@ -10553,28 +10553,28 @@ RelativePath=JIT\jit64\hfa\main\testA\hfa_nd0A_d\hfa_nd0A_d.exe
 WorkingDir=JIT\jit64\hfa\main\testA\hfa_nd0A_d
 Expected=100
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL;NEW_PASS
+Categories=Pri0;EXPECTED_PASS
 HostStyle=Any
 [hfa_nd0A_r.exe_1508]
 RelativePath=JIT\jit64\hfa\main\testA\hfa_nd0A_r\hfa_nd0A_r.exe
 WorkingDir=JIT\jit64\hfa\main\testA\hfa_nd0A_r
 Expected=100
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL;NEW_PASS
+Categories=Pri0;EXPECTED_PASS
 HostStyle=Any
 [hfa_nd1A_d.exe_1509]
 RelativePath=JIT\jit64\hfa\main\testA\hfa_nd1A_d\hfa_nd1A_d.exe
 WorkingDir=JIT\jit64\hfa\main\testA\hfa_nd1A_d
 Expected=100
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL;NEW_PASS
+Categories=Pri0;EXPECTED_PASS
 HostStyle=Any
 [hfa_nd1A_r.exe_1510]
 RelativePath=JIT\jit64\hfa\main\testA\hfa_nd1A_r\hfa_nd1A_r.exe
 WorkingDir=JIT\jit64\hfa\main\testA\hfa_nd1A_r
 Expected=100
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL;NEW_PASS
+Categories=Pri0;EXPECTED_PASS
 HostStyle=Any
 [hfa_nd2A_d.exe_1511]
 RelativePath=JIT\jit64\hfa\main\testA\hfa_nd2A_d\hfa_nd2A_d.exe
@@ -10595,28 +10595,28 @@ RelativePath=JIT\jit64\hfa\main\testA\hfa_nf0A_d\hfa_nf0A_d.exe
 WorkingDir=JIT\jit64\hfa\main\testA\hfa_nf0A_d
 Expected=100
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL;NEW_PASS
+Categories=Pri0;EXPECTED_PASS
 HostStyle=Any
 [hfa_nf0A_r.exe_1514]
 RelativePath=JIT\jit64\hfa\main\testA\hfa_nf0A_r\hfa_nf0A_r.exe
 WorkingDir=JIT\jit64\hfa\main\testA\hfa_nf0A_r
 Expected=100
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL;NEW_PASS
+Categories=Pri0;EXPECTED_PASS
 HostStyle=Any
 [hfa_nf1A_d.exe_1515]
 RelativePath=JIT\jit64\hfa\main\testA\hfa_nf1A_d\hfa_nf1A_d.exe
 WorkingDir=JIT\jit64\hfa\main\testA\hfa_nf1A_d
 Expected=100
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL;NEW_PASS
+Categories=Pri0;EXPECTED_PASS
 HostStyle=Any
 [hfa_nf1A_r.exe_1516]
 RelativePath=JIT\jit64\hfa\main\testA\hfa_nf1A_r\hfa_nf1A_r.exe
 WorkingDir=JIT\jit64\hfa\main\testA\hfa_nf1A_r
 Expected=100
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL;NEW_PASS
+Categories=Pri0;EXPECTED_PASS
 HostStyle=Any
 [hfa_nf2A_d.exe_1517]
 RelativePath=JIT\jit64\hfa\main\testA\hfa_nf2A_d\hfa_nf2A_d.exe
@@ -10637,28 +10637,28 @@ RelativePath=JIT\jit64\hfa\main\testA\hfa_sd0A_d\hfa_sd0A_d.exe
 WorkingDir=JIT\jit64\hfa\main\testA\hfa_sd0A_d
 Expected=100
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL;NEW_PASS
+Categories=Pri0;EXPECTED_PASS
 HostStyle=Any
 [hfa_sd0A_r.exe_1520]
 RelativePath=JIT\jit64\hfa\main\testA\hfa_sd0A_r\hfa_sd0A_r.exe
 WorkingDir=JIT\jit64\hfa\main\testA\hfa_sd0A_r
 Expected=100
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL;NEW_PASS
+Categories=Pri0;EXPECTED_PASS
 HostStyle=Any
 [hfa_sd1A_d.exe_1521]
 RelativePath=JIT\jit64\hfa\main\testA\hfa_sd1A_d\hfa_sd1A_d.exe
 WorkingDir=JIT\jit64\hfa\main\testA\hfa_sd1A_d
 Expected=100
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL;NEW_PASS
+Categories=Pri0;EXPECTED_PASS
 HostStyle=Any
 [hfa_sd1A_r.exe_1522]
 RelativePath=JIT\jit64\hfa\main\testA\hfa_sd1A_r\hfa_sd1A_r.exe
 WorkingDir=JIT\jit64\hfa\main\testA\hfa_sd1A_r
 Expected=100
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL;NEW_PASS
+Categories=Pri0;EXPECTED_PASS
 HostStyle=Any
 [hfa_sd2A_d.exe_1523]
 RelativePath=JIT\jit64\hfa\main\testA\hfa_sd2A_d\hfa_sd2A_d.exe
@@ -10679,28 +10679,28 @@ RelativePath=JIT\jit64\hfa\main\testA\hfa_sf0A_d\hfa_sf0A_d.exe
 WorkingDir=JIT\jit64\hfa\main\testA\hfa_sf0A_d
 Expected=100
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL;NEW_PASS
+Categories=Pri0;EXPECTED_PASS
 HostStyle=Any
 [hfa_sf0A_r.exe_1526]
 RelativePath=JIT\jit64\hfa\main\testA\hfa_sf0A_r\hfa_sf0A_r.exe
 WorkingDir=JIT\jit64\hfa\main\testA\hfa_sf0A_r
 Expected=100
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL;NEW_PASS
+Categories=Pri0;EXPECTED_PASS
 HostStyle=Any
 [hfa_sf1A_d.exe_1527]
 RelativePath=JIT\jit64\hfa\main\testA\hfa_sf1A_d\hfa_sf1A_d.exe
 WorkingDir=JIT\jit64\hfa\main\testA\hfa_sf1A_d
 Expected=100
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL;NEW_PASS
+Categories=Pri0;EXPECTED_PASS
 HostStyle=Any
 [hfa_sf1A_r.exe_1528]
 RelativePath=JIT\jit64\hfa\main\testA\hfa_sf1A_r\hfa_sf1A_r.exe
 WorkingDir=JIT\jit64\hfa\main\testA\hfa_sf1A_r
 Expected=100
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL;NEW_PASS
+Categories=Pri0;EXPECTED_PASS
 HostStyle=Any
 [hfa_sf2A_d.exe_1529]
 RelativePath=JIT\jit64\hfa\main\testA\hfa_sf2A_d\hfa_sf2A_d.exe
@@ -10721,14 +10721,14 @@ RelativePath=JIT\jit64\hfa\main\testB\hfa_nd0B_d\hfa_nd0B_d.exe
 WorkingDir=JIT\jit64\hfa\main\testB\hfa_nd0B_d
 Expected=100
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL;NEW_PASS
+Categories=Pri0;EXPECTED_PASS
 HostStyle=Any
 [hfa_nd0B_r.exe_1532]
 RelativePath=JIT\jit64\hfa\main\testB\hfa_nd0B_r\hfa_nd0B_r.exe
 WorkingDir=JIT\jit64\hfa\main\testB\hfa_nd0B_r
 Expected=100
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL;NEW_PASS
+Categories=Pri0;EXPECTED_PASS
 HostStyle=Any
 [hfa_nd2B_d.exe_1533]
 RelativePath=JIT\jit64\hfa\main\testB\hfa_nd2B_d\hfa_nd2B_d.exe
@@ -10749,14 +10749,14 @@ RelativePath=JIT\jit64\hfa\main\testB\hfa_nf0B_d\hfa_nf0B_d.exe
 WorkingDir=JIT\jit64\hfa\main\testB\hfa_nf0B_d
 Expected=100
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL;NEW_PASS
+Categories=Pri0;EXPECTED_PASS
 HostStyle=Any
 [hfa_nf0B_r.exe_1536]
 RelativePath=JIT\jit64\hfa\main\testB\hfa_nf0B_r\hfa_nf0B_r.exe
 WorkingDir=JIT\jit64\hfa\main\testB\hfa_nf0B_r
 Expected=100
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL;NEW_PASS
+Categories=Pri0;EXPECTED_PASS
 HostStyle=Any
 [hfa_nf2B_d.exe_1537]
 RelativePath=JIT\jit64\hfa\main\testB\hfa_nf2B_d\hfa_nf2B_d.exe
@@ -10777,14 +10777,14 @@ RelativePath=JIT\jit64\hfa\main\testB\hfa_sd0B_d\hfa_sd0B_d.exe
 WorkingDir=JIT\jit64\hfa\main\testB\hfa_sd0B_d
 Expected=100
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL;NEW_PASS
+Categories=Pri0;EXPECTED_PASS
 HostStyle=Any
 [hfa_sd0B_r.exe_1540]
 RelativePath=JIT\jit64\hfa\main\testB\hfa_sd0B_r\hfa_sd0B_r.exe
 WorkingDir=JIT\jit64\hfa\main\testB\hfa_sd0B_r
 Expected=100
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL;NEW_PASS
+Categories=Pri0;EXPECTED_PASS
 HostStyle=Any
 [hfa_sd2B_d.exe_1541]
 RelativePath=JIT\jit64\hfa\main\testB\hfa_sd2B_d\hfa_sd2B_d.exe
@@ -10805,14 +10805,14 @@ RelativePath=JIT\jit64\hfa\main\testB\hfa_sf0B_d\hfa_sf0B_d.exe
 WorkingDir=JIT\jit64\hfa\main\testB\hfa_sf0B_d
 Expected=100
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL;NEW_PASS
+Categories=Pri0;EXPECTED_PASS
 HostStyle=Any
 [hfa_sf0B_r.exe_1544]
 RelativePath=JIT\jit64\hfa\main\testB\hfa_sf0B_r\hfa_sf0B_r.exe
 WorkingDir=JIT\jit64\hfa\main\testB\hfa_sf0B_r
 Expected=100
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL;NEW_PASS
+Categories=Pri0;EXPECTED_PASS
 HostStyle=Any
 [hfa_sf2B_d.exe_1545]
 RelativePath=JIT\jit64\hfa\main\testB\hfa_sf2B_d\hfa_sf2B_d.exe
@@ -11932,28 +11932,28 @@ RelativePath=JIT\jit64\mcc\interop\mcc_i14\mcc_i14.exe
 WorkingDir=JIT\jit64\mcc\interop\mcc_i14
 Expected=100
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL;NEW_PASS
+Categories=Pri0;EXPECTED_PASS
 HostStyle=Any
 [mcc_i15.exe_1705]
 RelativePath=JIT\jit64\mcc\interop\mcc_i15\mcc_i15.exe
 WorkingDir=JIT\jit64\mcc\interop\mcc_i15
 Expected=100
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL;NEW_PASS
+Categories=Pri0;EXPECTED_PASS
 HostStyle=Any
 [mcc_i16.exe_1706]
 RelativePath=JIT\jit64\mcc\interop\mcc_i16\mcc_i16.exe
 WorkingDir=JIT\jit64\mcc\interop\mcc_i16
 Expected=100
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL;NEW_PASS
+Categories=Pri0;EXPECTED_PASS
 HostStyle=Any
 [mcc_i17.exe_1707]
 RelativePath=JIT\jit64\mcc\interop\mcc_i17\mcc_i17.exe
 WorkingDir=JIT\jit64\mcc\interop\mcc_i17
 Expected=100
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL;NEW_PASS
+Categories=Pri0;EXPECTED_PASS
 HostStyle=Any
 [mcc_i30.exe_1708]
 RelativePath=JIT\jit64\mcc\interop\mcc_i30\mcc_i30.exe
@@ -11988,28 +11988,28 @@ RelativePath=JIT\jit64\mcc\interop\mcc_i34\mcc_i34.exe
 WorkingDir=JIT\jit64\mcc\interop\mcc_i34
 Expected=100
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL;NATIVE_INTEROP
+Categories=Pri0;EXPECTED_PASS;NATIVE_INTEROP
 HostStyle=Any
 [mcc_i35.exe_1713]
 RelativePath=JIT\jit64\mcc\interop\mcc_i35\mcc_i35.exe
 WorkingDir=JIT\jit64\mcc\interop\mcc_i35
 Expected=100
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL;NATIVE_INTEROP
+Categories=Pri0;EXPECTED_PASS;NATIVE_INTEROP
 HostStyle=Any
 [mcc_i36.exe_1714]
 RelativePath=JIT\jit64\mcc\interop\mcc_i36\mcc_i36.exe
 WorkingDir=JIT\jit64\mcc\interop\mcc_i36
 Expected=100
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL;NATIVE_INTEROP
+Categories=Pri0;EXPECTED_PASS;NATIVE_INTEROP
 HostStyle=Any
 [mcc_i37.exe_1715]
 RelativePath=JIT\jit64\mcc\interop\mcc_i37\mcc_i37.exe
 WorkingDir=JIT\jit64\mcc\interop\mcc_i37
 Expected=100
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL;NATIVE_INTEROP
+Categories=Pri0;EXPECTED_PASS;NATIVE_INTEROP
 HostStyle=Any
 [mcc_i50.exe_1716]
 RelativePath=JIT\jit64\mcc\interop\mcc_i50\mcc_i50.exe
@@ -12044,28 +12044,28 @@ RelativePath=JIT\jit64\mcc\interop\mcc_i54\mcc_i54.exe
 WorkingDir=JIT\jit64\mcc\interop\mcc_i54
 Expected=100
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL;NEW_PASS
+Categories=Pri0;EXPECTED_PASS
 HostStyle=Any
 [mcc_i55.exe_1721]
 RelativePath=JIT\jit64\mcc\interop\mcc_i55\mcc_i55.exe
 WorkingDir=JIT\jit64\mcc\interop\mcc_i55
 Expected=100
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL;NEW_PASS
+Categories=Pri0;EXPECTED_PASS
 HostStyle=Any
 [mcc_i56.exe_1722]
 RelativePath=JIT\jit64\mcc\interop\mcc_i56\mcc_i56.exe
 WorkingDir=JIT\jit64\mcc\interop\mcc_i56
 Expected=100
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL;NEW_PASS
+Categories=Pri0;EXPECTED_PASS
 HostStyle=Any
 [mcc_i57.exe_1723]
 RelativePath=JIT\jit64\mcc\interop\mcc_i57\mcc_i57.exe
 WorkingDir=JIT\jit64\mcc\interop\mcc_i57
 Expected=100
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL;NEW_PASS
+Categories=Pri0;EXPECTED_PASS
 HostStyle=Any
 [mcc_i60.exe_1724]
 RelativePath=JIT\jit64\mcc\interop\mcc_i60\mcc_i60.exe
@@ -12100,28 +12100,28 @@ RelativePath=JIT\jit64\mcc\interop\mcc_i64\mcc_i64.exe
 WorkingDir=JIT\jit64\mcc\interop\mcc_i64
 Expected=100
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL;NEW_PASS
+Categories=Pri0;EXPECTED_PASS
 HostStyle=Any
 [mcc_i65.exe_1729]
 RelativePath=JIT\jit64\mcc\interop\mcc_i65\mcc_i65.exe
 WorkingDir=JIT\jit64\mcc\interop\mcc_i65
 Expected=100
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL;NEW_PASS
+Categories=Pri0;EXPECTED_PASS
 HostStyle=Any
 [mcc_i66.exe_1730]
 RelativePath=JIT\jit64\mcc\interop\mcc_i66\mcc_i66.exe
 WorkingDir=JIT\jit64\mcc\interop\mcc_i66
 Expected=100
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL;NEW_PASS
+Categories=Pri0;EXPECTED_PASS
 HostStyle=Any
 [mcc_i67.exe_1731]
 RelativePath=JIT\jit64\mcc\interop\mcc_i67\mcc_i67.exe
 WorkingDir=JIT\jit64\mcc\interop\mcc_i67
 Expected=100
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL;NEW_PASS
+Categories=Pri0;EXPECTED_PASS
 HostStyle=Any
 [mcc_i70.exe_1732]
 RelativePath=JIT\jit64\mcc\interop\mcc_i70\mcc_i70.exe
@@ -12156,28 +12156,28 @@ RelativePath=JIT\jit64\mcc\interop\mcc_i74\mcc_i74.exe
 WorkingDir=JIT\jit64\mcc\interop\mcc_i74
 Expected=100
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL;NEW_PASS
+Categories=Pri0;EXPECTED_PASS
 HostStyle=Any
 [mcc_i75.exe_1737]
 RelativePath=JIT\jit64\mcc\interop\mcc_i75\mcc_i75.exe
 WorkingDir=JIT\jit64\mcc\interop\mcc_i75
 Expected=100
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL;NEW_PASS
+Categories=Pri0;EXPECTED_PASS
 HostStyle=Any
 [mcc_i76.exe_1738]
 RelativePath=JIT\jit64\mcc\interop\mcc_i76\mcc_i76.exe
 WorkingDir=JIT\jit64\mcc\interop\mcc_i76
 Expected=100
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL;NEW_PASS
+Categories=Pri0;EXPECTED_PASS
 HostStyle=Any
 [mcc_i77.exe_1739]
 RelativePath=JIT\jit64\mcc\interop\mcc_i77\mcc_i77.exe
 WorkingDir=JIT\jit64\mcc\interop\mcc_i77
 Expected=100
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL;NEW_PASS
+Categories=Pri0;EXPECTED_PASS
 HostStyle=Any
 [mcc_i80.exe_1740]
 RelativePath=JIT\jit64\mcc\interop\mcc_i80\mcc_i80.exe
@@ -16139,14 +16139,14 @@ RelativePath=JIT\Methodical\Arrays\huge\_il_dbghuge_r4\_il_dbghuge_r4.exe
 WorkingDir=JIT\Methodical\Arrays\huge\_il_dbghuge_r4
 Expected=100
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL;NEW_PASS
+Categories=Pri0;EXPECTED_PASS
 HostStyle=Any
 [_il_dbghuge_r8.exe_2306]
 RelativePath=JIT\Methodical\Arrays\huge\_il_dbghuge_r8\_il_dbghuge_r8.exe
 WorkingDir=JIT\Methodical\Arrays\huge\_il_dbghuge_r8
 Expected=100
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL;NEW_PASS
+Categories=Pri0;EXPECTED_PASS
 HostStyle=Any
 [_il_dbghuge_struct.exe_2307]
 RelativePath=JIT\Methodical\Arrays\huge\_il_dbghuge_struct\_il_dbghuge_struct.exe
@@ -16188,14 +16188,14 @@ RelativePath=JIT\Methodical\Arrays\huge\_il_relhuge_r4\_il_relhuge_r4.exe
 WorkingDir=JIT\Methodical\Arrays\huge\_il_relhuge_r4
 Expected=100
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL;NEW_PASS
+Categories=Pri0;EXPECTED_PASS
 HostStyle=Any
 [_il_relhuge_r8.exe_2313]
 RelativePath=JIT\Methodical\Arrays\huge\_il_relhuge_r8\_il_relhuge_r8.exe
 WorkingDir=JIT\Methodical\Arrays\huge\_il_relhuge_r8
 Expected=100
 MaxAllowedDurationSeconds=600
-Categories=Pri0;EXPECTED_FAIL;NEW_PASS
+Categories=Pri0;EXPECTED_PASS
 HostStyle=Any
 [_il_relhuge_struct.exe_2314]
 RelativePath=JIT\Methodical\Arrays\huge\_il_relhuge_struct\_il_relhuge_struct.exe
diff --git a/tests/src/JIT/CodeGenBringUpTests/struct16args.cs b/tests/src/JIT/CodeGenBringUpTests/struct16args.cs
new file mode 100644 (file)
index 0000000..c39a95e
--- /dev/null
@@ -0,0 +1,739 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+//
+
+
+using System;
+using System.Runtime.CompilerServices;
+
+public struct Point
+{
+  public int w;
+  public int x;
+  public int y;
+  public int z;
+
+  [MethodImplAttribute(MethodImplOptions.NoInlining)]
+  public Point(int a, int b, int c, int d) { w=a; x=a; y=b; z=d; }
+
+  public int W
+  {
+     [MethodImplAttribute(MethodImplOptions.NoInlining)]
+     get { return this.w; }
+
+     [MethodImplAttribute(MethodImplOptions.NoInlining)]
+     set { this.w = value; }
+  }
+
+  public int X
+  {
+     [MethodImplAttribute(MethodImplOptions.NoInlining)]
+     get { return this.x; }
+
+     [MethodImplAttribute(MethodImplOptions.NoInlining)]
+     set { this.x = value; }
+  }
+
+  public int Y
+  {
+     [MethodImplAttribute(MethodImplOptions.NoInlining)]
+     get { return this.y; }
+
+     [MethodImplAttribute(MethodImplOptions.NoInlining)]
+     set { this.y = value; }
+  }
+
+  public int Z
+  {
+     [MethodImplAttribute(MethodImplOptions.NoInlining)]
+     get { return this.z; }
+
+     [MethodImplAttribute(MethodImplOptions.NoInlining)]
+     set { this.z = value; }
+  }
+
+  // Returns true if this represents 'origin' otherwise false.
+  [MethodImplAttribute(MethodImplOptions.NoInlining)]
+  public bool StructInstMethod() { return (x==0 && y == 0 && z==0); }
+
+}
+
+public class BringUpTest
+{
+    const int Pass = 100;
+    const int Fail = -1;
+
+    [MethodImplAttribute(MethodImplOptions.NoInlining)]
+    public static int method_4S(Point p0, Point p1, Point p2, Point p3)
+    {
+        Console.Write("method_4S");
+    
+        if (p0.W != 0)
+            return Fail;
+
+        if (p0.X != 0)
+            return Fail;
+
+        if (p0.Y != 0)
+            return Fail;
+
+        if (p0.Z != 0)
+            return Fail;
+
+        if (p1.W != 1)
+            return Fail;
+
+        if (p1.X != 1)
+            return Fail;
+
+        if (p1.Y != 1)
+            return Fail;
+
+        if (p1.Z != 1)
+            return Fail;
+
+        if (p2.W != 9)
+            return Fail;
+
+        if (p2.X != 99)
+            return Fail;
+
+        if (p2.Y != 999)
+            return Fail;
+
+        if (p2.Z != 9999)
+            return Fail;
+
+        if (p3.W != 10)
+            return Fail;
+
+        if (p3.X != 100)
+            return Fail;
+
+        if (p3.Y != 1000)
+            return Fail;
+
+        if (p3.Z != 10000)
+            return Fail;
+
+        Console.WriteLine(" Pass");
+
+        return Pass;
+    }
+
+    [MethodImplAttribute(MethodImplOptions.NoInlining)]
+    public static int method_4S4I(Point p0, Point p1, Point p2, Point p3, int i0, int i1, int i2, int i3)
+    {
+        Console.Write("method_4S4I");
+
+        if (i0 != 2)
+            return Fail;
+
+        if (i1 != 3)
+            return Fail;
+
+        if (i2 != 5)
+            return Fail;
+
+        if (i3 != 7)
+            return Fail;
+
+        if (p0.W != 0)
+            return Fail;
+
+        if (p0.X != 0)
+            return Fail;
+
+        if (p0.Y != 0)
+            return Fail;
+
+        if (p0.Z != 0)
+            return Fail;
+
+        if (p1.W != 1)
+            return Fail;
+
+        if (p1.X != 1)
+            return Fail;
+
+        if (p1.Y != 1)
+            return Fail;
+
+        if (p1.Z != 1)
+            return Fail;
+
+        if (p2.W != 9)
+            return Fail;
+
+        if (p2.X != 99)
+            return Fail;
+
+        if (p2.Y != 999)
+            return Fail;
+
+        if (p2.Z != 9999)
+            return Fail;
+
+        if (p3.W != 10)
+            return Fail;
+
+        if (p3.X != 100)
+            return Fail;
+
+        if (p3.Y != 1000)
+            return Fail;
+
+        if (p3.Z != 10000)
+            return Fail;
+
+        Console.WriteLine(" Pass");
+
+        return Pass;
+    }
+
+    [MethodImplAttribute(MethodImplOptions.NoInlining)]
+    public static int method_4I4S(int i0, int i1, int i2, int i3, Point p0, Point p1, Point p2, Point p3)
+    {
+        Console.Write("method_4I4S");
+
+        if (i0 != 2)
+            return Fail;
+
+        if (i1 != 3)
+            return Fail;
+
+        if (i2 != 5)
+            return Fail;
+
+        if (i3 != 7)
+            return Fail;
+
+        if (p0.W != 0)
+            return Fail;
+
+        if (p0.X != 0)
+            return Fail;
+
+        if (p0.Y != 0)
+            return Fail;
+
+        if (p0.Z != 0)
+            return Fail;
+
+        if (p1.W != 1)
+            return Fail;
+
+        if (p1.X != 1)
+            return Fail;
+
+        if (p1.Y != 1)
+            return Fail;
+
+        if (p1.Z != 1)
+            return Fail;
+
+        if (p2.W != 9)
+            return Fail;
+
+        if (p2.X != 99)
+            return Fail;
+
+        if (p2.Y != 999)
+            return Fail;
+
+        if (p2.Z != 9999)
+            return Fail;
+
+        if (p3.W != 10)
+            return Fail;
+
+        if (p3.X != 100)
+            return Fail;
+
+        if (p3.Y != 1000)
+            return Fail;
+
+        if (p3.Z != 10000)
+            return Fail;
+
+        Console.WriteLine(" Pass");
+
+        return Pass;
+    }
+
+    [MethodImplAttribute(MethodImplOptions.NoInlining)]
+    public static int method_1I4S(int i0, Point p0, Point p1, Point p2, Point p3)
+    {
+        Console.Write("method_1I4S");
+
+        if (i0 != 2)
+            return Fail;
+
+        if (p0.W != 0)
+            return Fail;
+
+        if (p0.X != 0)
+            return Fail;
+
+        if (p0.Y != 0)
+            return Fail;
+
+        if (p0.Z != 0)
+            return Fail;
+
+        if (p1.W != 1)
+            return Fail;
+
+        if (p1.X != 1)
+            return Fail;
+
+        if (p1.Y != 1)
+            return Fail;
+
+        if (p1.Z != 1)
+            return Fail;
+
+        if (p2.W != 9)
+            return Fail;
+
+        if (p2.X != 99)
+            return Fail;
+
+        if (p2.Y != 999)
+            return Fail;
+
+        if (p2.Z != 9999)
+            return Fail;
+
+        if (p3.W != 10)
+            return Fail;
+
+        if (p3.X != 100)
+            return Fail;
+
+        if (p3.Y != 1000)
+            return Fail;
+
+        if (p3.Z != 10000)
+            return Fail;
+
+        Console.WriteLine(" Pass");
+
+        return Pass;
+    }
+
+    [MethodImplAttribute(MethodImplOptions.NoInlining)]
+    public static int method_2I4S(int i0, int i1, Point p0, Point p1, Point p2, Point p3)
+    {
+        Console.Write("method_2I4S");
+
+        if (i0 != 2)
+            return Fail;
+
+        if (i1 != 3)
+            return Fail;
+
+        if (p0.W != 0)
+            return Fail;
+
+        if (p0.X != 0)
+            return Fail;
+
+        if (p0.Y != 0)
+            return Fail;
+
+        if (p0.Z != 0)
+            return Fail;
+
+        if (p1.W != 1)
+            return Fail;
+
+        if (p1.X != 1)
+            return Fail;
+
+        if (p1.Y != 1)
+            return Fail;
+
+        if (p1.Z != 1)
+            return Fail;
+
+        if (p2.W != 9)
+            return Fail;
+
+        if (p2.X != 99)
+            return Fail;
+
+        if (p2.Y != 999)
+            return Fail;
+
+        if (p2.Z != 9999)
+            return Fail;
+
+        if (p3.W != 10)
+            return Fail;
+
+        if (p3.X != 100)
+            return Fail;
+
+        if (p3.Y != 1000)
+            return Fail;
+
+        if (p3.Z != 10000)
+            return Fail;
+
+        Console.WriteLine(" Pass");
+
+        return Pass;
+    }
+
+    [MethodImplAttribute(MethodImplOptions.NoInlining)]
+    public static int method_3I4S(int i0, int i1, int i2, Point p0, Point p1, Point p2, Point p3)
+    {
+        Console.Write("method_3I4S");
+
+        if (i0 != 2)
+            return Fail;
+
+        if (i1 != 3)
+            return Fail;
+
+        if (i2 != 5)
+            return Fail;
+
+        if (p0.W != 0)
+            return Fail;
+
+        if (p0.X != 0)
+            return Fail;
+
+        if (p0.Y != 0)
+            return Fail;
+
+        if (p0.Z != 0)
+            return Fail;
+
+        if (p1.W != 1)
+            return Fail;
+
+        if (p1.X != 1)
+            return Fail;
+
+        if (p1.Y != 1)
+            return Fail;
+
+        if (p1.Z != 1)
+            return Fail;
+
+        if (p2.W != 9)
+            return Fail;
+
+        if (p2.X != 99)
+            return Fail;
+
+        if (p2.Y != 999)
+            return Fail;
+
+        if (p2.Z != 9999)
+            return Fail;
+
+        if (p3.W != 10)
+            return Fail;
+
+        if (p3.X != 100)
+            return Fail;
+
+        if (p3.Y != 1000)
+            return Fail;
+
+        if (p3.Z != 10000)
+            return Fail;
+
+        Console.WriteLine(" Pass");
+
+        return Pass;
+    }
+
+    [MethodImplAttribute(MethodImplOptions.NoInlining)]
+    public static int method_2I4S2D(int i0, int i1, Point p0, Point p1, Point p2, Point p3, double d0, double d1)
+    {
+        Console.Write("method_2I4S2D");
+
+        if (i0 != 2)
+            return Fail;
+
+        if (i1 != 3)
+            return Fail;
+
+        if (d0 != 11.0d)
+            return Fail;
+
+        if (d1 != 13.0d)
+            return Fail;
+
+        if (p0.W != 0)
+            return Fail;
+
+        if (p0.X != 0)
+            return Fail;
+
+        if (p0.Y != 0)
+            return Fail;
+
+        if (p0.Z != 0)
+            return Fail;
+
+        if (p1.W != 1)
+            return Fail;
+
+        if (p1.X != 1)
+            return Fail;
+
+        if (p1.Y != 1)
+            return Fail;
+
+        if (p1.Z != 1)
+            return Fail;
+
+        if (p2.W != 9)
+            return Fail;
+
+        if (p2.X != 99)
+            return Fail;
+
+        if (p2.Y != 999)
+            return Fail;
+
+        if (p2.Z != 9999)
+            return Fail;
+
+        if (p3.W != 10)
+            return Fail;
+
+        if (p3.X != 100)
+            return Fail;
+
+        if (p3.Y != 1000)
+            return Fail;
+
+        if (p3.Z != 10000)
+            return Fail;
+
+        Console.WriteLine(" Pass");
+
+        return Pass;
+    }
+
+    [MethodImplAttribute(MethodImplOptions.NoInlining)]
+    public static int method_2I2D4S(int i0, int i1, double d0, double d1, Point p0, Point p1, Point p2, Point p3)
+    {
+        Console.Write("method_2I2D4S");
+
+        if (i0 != 2)
+            return Fail;
+
+        if (i1 != 3)
+            return Fail;
+
+        if (d0 != 11.0d)
+            return Fail;
+
+        if (d1 != 13.0d)
+            return Fail;
+
+        if (p0.W != 0)
+            return Fail;
+
+        if (p0.X != 0)
+            return Fail;
+
+        if (p0.Y != 0)
+            return Fail;
+
+        if (p0.Z != 0)
+            return Fail;
+
+        if (p1.W != 1)
+            return Fail;
+
+        if (p1.X != 1)
+            return Fail;
+
+        if (p1.Y != 1)
+            return Fail;
+
+        if (p1.Z != 1)
+            return Fail;
+
+        if (p2.W != 9)
+            return Fail;
+
+        if (p2.X != 99)
+            return Fail;
+
+        if (p2.Y != 999)
+            return Fail;
+
+        if (p2.Z != 9999)
+            return Fail;
+
+        if (p3.W != 10)
+            return Fail;
+
+        if (p3.X != 100)
+            return Fail;
+
+        if (p3.Y != 1000)
+            return Fail;
+
+        if (p3.Z != 10000)
+            return Fail;
+
+        Console.WriteLine(" Pass");
+
+        return Pass;
+    }
+
+    [MethodImplAttribute(MethodImplOptions.NoInlining)]
+    public static int method_2I2D4S2D(int i0, int i1, double d0, double d1, Point p0, Point p1, Point p2, Point p3, double d2, double d3)
+    {
+        Console.Write("method_2I2D4S2D");
+
+        if (i0 != 2)
+            return Fail;
+
+        if (i1 != 3)
+            return Fail;
+
+        if (d0 != 11.0d)
+            return Fail;
+
+        if (d1 != 13.0d)
+            return Fail;
+
+        if (d2 != 15.0d)
+            return Fail;
+
+        if (d3 != 17.0d)
+            return Fail;
+
+        if (p0.W != 0)
+            return Fail;
+
+        if (p0.X != 0)
+            return Fail;
+
+        if (p0.Y != 0)
+            return Fail;
+
+        if (p0.Z != 0)
+            return Fail;
+
+        if (p1.W != 1)
+            return Fail;
+
+        if (p1.X != 1)
+            return Fail;
+
+        if (p1.Y != 1)
+            return Fail;
+
+        if (p1.Z != 1)
+            return Fail;
+
+        if (p2.W != 9)
+            return Fail;
+
+        if (p2.X != 99)
+            return Fail;
+
+        if (p2.Y != 999)
+            return Fail;
+
+        if (p2.Z != 9999)
+            return Fail;
+
+        if (p3.W != 10)
+            return Fail;
+
+        if (p3.X != 100)
+            return Fail;
+
+        if (p3.Y != 1000)
+            return Fail;
+
+        if (p3.Z != 10000)
+            return Fail;
+
+        Console.WriteLine(" Pass");
+
+        return Pass;
+    }
+
+    public static int Main()
+    {       
+       int i0 = 2;
+       int i1 = 3;
+       int i2 = 5;
+       int i3 = 7;
+
+       double d0 = 11.0d;
+       double d1 = 13.0d;
+       double d2 = 15.0d;
+       double d3 = 17.0d;
+
+       Point p0;
+       Point p1;
+       Point p2;
+       Point p3;
+
+       p0.w = 0;
+       p0.x = 0;
+       p0.y = 0;
+       p0.z = 0;
+
+       p1.w = 1;
+       p1.x = 1;
+       p1.y = 1;
+       p1.z = 1;
+
+       p2.w = 9;
+       p2.x = 99;
+       p2.y = 999;
+       p2.z = 9999;
+
+       p3.w = 10;
+       p3.x = 100;
+       p3.y = 1000;
+       p3.z = 10000;
+
+       if (method_4S(p0,p1,p2,p3) != Pass)
+           return Fail;
+
+       if (method_4S4I(p0,p1,p2,p3, i0,i1,i2,i3) != Pass)
+           return Fail;
+
+       if (method_4I4S(i0,i1,i2,i3, p0,p1,p2,p3) != Pass)
+           return Fail;
+
+       if (method_1I4S(i0, p0,p1,p2,p3) != Pass)
+           return Fail;
+
+       if (method_2I4S(i0,i1, p0,p1,p2,p3) != Pass)
+           return Fail;
+
+       if (method_3I4S(i0,i1,i2, p0,p1,p2,p3) != Pass)
+           return Fail;
+
+       if (method_2I4S2D(i0,i1, p0,p1,p2,p3, d0,d1) != Pass)
+           return Fail;
+
+       if (method_2I2D4S(i0,i1, d0,d1, p0,p1,p2,p3) != Pass)
+           return Fail;
+
+       if (method_2I2D4S2D(i0,i1, d0,d1, p0,p1,p2,p3, d2,d3) != Pass)
+           return Fail;
+
+       return Pass;
+    }
+}
diff --git a/tests/src/JIT/CodeGenBringUpTests/struct16args.csproj b/tests/src/JIT/CodeGenBringUpTests/struct16args.csproj
new file mode 100644 (file)
index 0000000..0d72e6e
--- /dev/null
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <FileAlignment>512</FileAlignment>
+    <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+    <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+    <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+  </PropertyGroup>
+  <!-- Default configurations to help VS understand the configurations -->
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+  </PropertyGroup>
+  <ItemGroup>
+    <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+      <Visible>False</Visible>
+    </CodeAnalysisDependentAssemblyPaths>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="$(JitPackagesConfigFileDirectory)threading+thread\project.json" />
+  </ItemGroup>
+  <ItemGroup>
+    <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="struct16args.cs" />
+  </ItemGroup>
+  <PropertyGroup>
+    <ProjectJson>$(JitPackagesConfigFileDirectory)threading+thread\project.json</ProjectJson>
+    <ProjectLockJson>$(JitPackagesConfigFileDirectory)threading+thread\project.lock.json</ProjectLockJson>
+  </PropertyGroup>
+  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+  <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+  </PropertyGroup>
+</Project>