[msvc] Update csproj files (#5220)
[mono.git] / mono / tests / verifier / make_tests.sh
index a5c95608216c80cd1c0567007df090c548690cbd..ccad6f00ddb385a62e48f1cd831f690a00a11a6a 100755 (executable)
@@ -25,7 +25,7 @@ done
 I=1
 for OP in add div mul rem sub
 do
-  if [ "$OP" == "div" ] || [ "$OP" == "rem" ]; then
+  if [ "$OP" = "div" ] || [ "$OP" = "rem" ]; then
        INIT="yes";
   else
        INIT="no";
@@ -92,7 +92,7 @@ done
 I=1
 for OP in div mul rem
 do
-  if [ "$OP" == "div" ] || [ "$OP" == "div" ]; then
+  if [ "$OP" = "div" ] || [ "$OP" = "div" ]; then
        INIT="yes";
   else
        INIT="no";
@@ -112,7 +112,7 @@ done
 I=1
 for OP in div mul rem add
 do
-  if [ "$OP" == "div" ] || [ "$OP" == "div" ]; then
+  if [ "$OP" = "div" ] || [ "$OP" = "div" ]; then
        INIT="yes";
   else
        INIT="no";
@@ -189,6 +189,7 @@ do
        ./make_bin_test.sh bin_cgt_un_a_${I} unverifiable 'cgt.un' "${TYPE}" 'object'
        ./make_bin_test.sh bin_cgt_un_b_${I} unverifiable 'cgt.un' 'object' "${TYPE}"
   I=`expr $I + 1`
+done
 
 for OP in ceq
 do
@@ -320,15 +321,19 @@ do
     I=`expr $I + 1`
   done
 
-  for TYPE in 'object' 'string' 'class Class' 'valuetype MyStruct' 'int32[]' 'int32[,]' 'typedref' 'int32*' 'method int32 *(int32)' 'class Template`1<object>' 'int8&' 'bool&' 'unsigned int8&' 'int16&' 'char&' 'unsigned int16&' 'int32&' 'unsigned int32&' 'int64&' 'unsigned int64&' 'float32&' 'float64&' 'native int&' 'native unsigned int&' 'object&' 'string&' 'class Class&' 'valuetype MyStruct&' 'int32[]&' 'int32[,]&' 'typedref&'  'class Template`1<object>&'
+  for TYPE in 'object' 'string' 'class Class' 'valuetype MyStruct' 'int32[]' 'int32[,]' 'typedref' 'int32*' 'method int32 *(int32)' 'class Template`1<object>' 'int8&' 'bool&' 'unsigned int8&' 'int16&' 'char&' 'unsigned int16&' 'int32&' 'unsigned int32&' 'int64&' 'unsigned int64&' 'float32&' 'float64&' 'native int&' 'native unsigned int&' 'object&' 'string&' 'class Class&' 'valuetype MyStruct&' 'int32[]&' 'int32[,]&' 'class Template`1<object>&'
   do
     ./make_unary_test.sh conv_op_${J}_${I} unverifiable $OP "$TYPE"
     I=`expr $I + 1`
   done
+
+  ./make_unary_test.sh conv_op_${J}_${I} invalid $OP "typedref&"
   J=`expr $J + 1`
   I=1
 done
 
+
+
 #local and argument store with invalid values lead to unverifiable code
 I=1
 for OP in stloc.0 "stloc.s 0" "starg 0" "starg.s 0"
@@ -430,7 +435,7 @@ do
   ./make_store_test.sh coercion_78_${I} unverifiable "$OP" typedref 'native int'
   ./make_store_test.sh coercion_89_${I} unverifiable "$OP" typedref int64
   ./make_store_test.sh coercion_80_${I} unverifiable "$OP" typedref float64
-  ./make_store_test.sh coercion_81_${I} unverifiable "$OP" typedref 'typedref&'
+  ./make_store_test.sh coercion_81_${I} invalid "$OP" typedref 'typedref&'
   ./make_store_test.sh coercion_82_${I} unverifiable "$OP" typedref object
   I=`expr $I + 1`
 done
@@ -498,9 +503,9 @@ function fix () {
                A=$1;
        fi
 
-       if [ "$A" == "bool&" ]; then
+       if [ "$A" = "bool&" ]; then
                A="int8&";
-       elif [ "$A" == "char&" ]; then
+       elif [ "$A" = "char&" ]; then
                A="int16&";
        fi
 
@@ -517,11 +522,11 @@ do
                do
                        TA="$(fix $TYPE1)"
                        TB="$(fix $TYPE2)"
-                       if [ "$TA" == "$TB" ]; then
+                       if [ "$TA" = "$TB" ]; then
                                ./make_store_test.sh ref_coercion_${I} valid "$OP" "$TYPE1" "$TYPE2"
-                       elif [ "$TA" == "int32&" ] && [ "$TB" == "int&" ]; then
+                       elif [ "$TA" = "int32&" ] && [ "$TB" = "int&" ]; then
                                ./make_store_test.sh ref_coercion_${I} valid "$OP" "$TYPE1" "$TYPE2"
-                       elif [ "$TA" == "int&" ] && [ "$TB" == "int32&" ]; then
+                       elif [ "$TA" = "int&" ] && [ "$TB" = "int32&" ]; then
                                ./make_store_test.sh ref_coercion_${I} valid "$OP" "$TYPE1" "$TYPE2"
                        else
                                ./make_store_test.sh ref_coercion_${I} unverifiable "$OP" "$TYPE1" "$TYPE2"
@@ -540,7 +545,7 @@ do
                do
                        TA="$(fix $TYPE1)"
                        TB="$(fix $TYPE2)"
-                       if [ "$TA" == "$TB" ]; then
+                       if [ "$TA" = "$TB" ]; then
                                ./make_store_test.sh ref_coercion_${I} valid "$OP" "$TYPE1" "$TYPE2"
                        else
                                ./make_store_test.sh ref_coercion_${I} unverifiable "$OP" "$TYPE1" "$TYPE2"
@@ -556,7 +561,7 @@ do
        do
                for TYPE2 in 'class ClassA&' 'class ClassB&' 'class InterfaceA&' 'class InterfaceB&' 'class ValueType&'
                do
-                       if [ "$TYPE1" == "$TYPE2" ]; then
+                       if [ "$TYPE1" = "$TYPE2" ]; then
                                ./make_store_test.sh ref_coercion_${I} valid "$OP" "$TYPE1" "$TYPE2"
                        else
                                ./make_store_test.sh ref_coercion_${I} unverifiable "$OP" "$TYPE1" "$TYPE2"
@@ -786,17 +791,17 @@ do
        ZZ=`echo $TYPE2 | grep "*";`
        T2_PTR=$?
        
-    if (($T1_PTR == 0  ||  $T2_PTR == 0)); then
+    if [ $T1_PTR -eq 0 ] || [ $T2_PTR -eq 0 ]; then
                ./make_stack_merge_test.sh stack_merge_${I} unverifiable "$TYPE1" "$TYPE2"
-    elif [ "$TYPE1" == "$TYPE2" ]; then
+    elif [ "$TYPE1" = "$TYPE2" ]; then
                ./make_stack_merge_test.sh stack_merge_${I} valid "$TYPE1" "$TYPE2"
-       elif [ "$TYPE1" == "int32" ] && [ "$TYPE2" == "native int" ]; then
+       elif [ "$TYPE1" = "int32" ] && [ "$TYPE2" = "native int" ]; then
                ./make_stack_merge_test.sh stack_merge_${I} valid "$TYPE1" "$TYPE2"
-       elif [ "$TYPE1" == "native int" ] && [ "$TYPE2" == "int32" ]; then
+       elif [ "$TYPE1" = "native int" ] && [ "$TYPE2" = "int32" ]; then
                ./make_stack_merge_test.sh stack_merge_${I} valid "$TYPE1" "$TYPE2"
-       elif [ "$TYPE1" == "int32&" ] && [ "$TYPE2" == "native int&" ]; then
+       elif [ "$TYPE1" = "int32&" ] && [ "$TYPE2" = "native int&" ]; then
                ./make_stack_merge_test.sh stack_merge_${I} valid "$TYPE1" "$TYPE2"
-       elif [ "$TYPE1" == "native int&" ] && [ "$TYPE2" == "int32&" ]; then
+       elif [ "$TYPE1" = "native int&" ] && [ "$TYPE2" = "int32&" ]; then
                ./make_stack_merge_test.sh stack_merge_${I} valid "$TYPE1" "$TYPE2"
        else
                ./make_stack_merge_test.sh stack_merge_${I} unverifiable "$TYPE1" "$TYPE2"
@@ -1047,7 +1052,7 @@ done
 ./make_ret_test.sh ret_coercion_78 unverifiable typedref 'native int'
 ./make_ret_test.sh ret_coercion_79 unverifiable typedref int64
 ./make_ret_test.sh ret_coercion_80 unverifiable typedref float64
-./make_ret_test.sh ret_coercion_81 unverifiable typedref 'typedref&'
+./make_ret_test.sh ret_coercion_81 badmd typedref 'typedref&'
 ./make_ret_test.sh ret_coercion_82 unverifiable typedref object
 
 ./make_ret_test.sh ret_coercion_83 valid int32 "native int"
@@ -1330,7 +1335,7 @@ do
        MAX_PARAM_RESULT="unverifiable"
        POPS="pop\npop\npop\npop\npop\npop\npop\npop\n"
        
-       if [ "$OP" == "ldloc" ]; then
+       if [ "$OP" = "ldloc" ]; then
                MAX_PARAM_RESULT="invalid"
 
                LOCALS_1=$ARGS_1
@@ -1407,6 +1412,10 @@ do
        ./make_bool_branch_test.sh boolean_branch_${I}_18 unverifiable ${OP} float64
        ./make_bool_branch_test.sh boolean_branch_${I}_19 unverifiable ${OP} 'class MyValueType'
        ./make_bool_branch_test.sh boolean_branch_${I}_20 unverifiable ${OP} 'class ValueTypeTemplate`1<object>'
+
+       ./make_bool_branch_test.sh boolean_branch_${I}_21 valid ${OP} object "pop\n\tldnull"
+       ./make_bool_branch_test.sh boolean_branch_${I}_22 valid ${OP} MyValueType "pop\n\tldnull\n\tisinst MyValueType"
+
        I=`expr $I + 1`
 done
 
@@ -1883,7 +1892,7 @@ function create_nesting_test_same_result () {
       do
         for LOAD in yes no
         do
-          if ! ( [ "$NESTED" == "no" ] && [ "$LOAD" == "yes" ] ) ; then
+          if ! ( [ "$NESTED" = "no" ] && [ "$LOAD" = "yes" ] ) ; then
             ./make_double_nesting_test.sh double_nesting_access_check_${K}_$I $2 "$OP" $3 $4 $5 "$BASE" "$NESTED" "$LOAD"
             K=`expr $K + 1`
           fi
@@ -1901,9 +1910,9 @@ function create_nesting_test_only_first_ok () {
       do
         for LOAD in yes no
         do
-          if ! ( [ "$NESTED" == "no" ] && [ "$LOAD" == "yes" ] ) ; then
+          if ! ( [ "$NESTED" = "no" ] && [ "$LOAD" = "yes" ] ) ; then
               EXPECT=unverifiable
-           if [ "$FIRST" == "$K" ]; then
+           if [ "$FIRST" = "$K" ]; then
               EXPECT=valid
            fi
            ./make_double_nesting_test.sh double_nesting_access_check_${K}_$I $EXPECT "$OP" $2 $3 $4 "$BASE" "$NESTED" "$LOAD"
@@ -2056,7 +2065,7 @@ function create_nesting_test_strips_result_static () {
     for NESTED in yes no
       do
         EXPECT=unverifiable
-        if [ "$NESTED" == "yes" ]; then
+        if [ "$NESTED" = "yes" ]; then
           EXPECT=valid
         fi
         ./make_double_nesting_test.sh double_nesting_access_check_${K}_$I $EXPECT "$OP" $2 $3 $4 "$BASE" "$NESTED" yes
@@ -2179,9 +2188,9 @@ function fix_ldobj () {
                A=$1;
        fi
 
-       if [ "$A" == "bool" ]; then
+       if [ "$A" = "bool" ]; then
                A="int8";
-       elif [ "$A" == "char" ]; then
+       elif [ "$A" = "char" ]; then
                A="int16";
        fi
 
@@ -2198,7 +2207,7 @@ do
        do
                TYPE1="$(fix_ldobj $T1)"
                TYPE2="$(fix_ldobj $T2)"
-               if [ "$TYPE1" == "$TYPE2" ] ; then
+               if [ "$TYPE1" = "$TYPE2" ] ; then
                        ./make_ldobj_test.sh ldobj_${I} valid "${T1}\&" "${T2}"
                else
                        ./make_ldobj_test.sh ldobj_${I} unverifiable "${T1}\&" "${T2}"
@@ -2213,13 +2222,18 @@ done
 #for T1 in "int8" "int64" "float64" "object" "string" "class Class" "int32[]" "int32[,]" "valuetype MyStruct" "valuetype MyStruct2" "int32 *" "valuetype MyStruct *" "method int32 *(int32)"
 for T1 in "native int" "int8*" "typedref" 
 do
-       for T2 in "int8" "int64" "float64" "object" "string" "class Class" "int32[]" "int32[,]" "valuetype MyStruct" "valuetype MyStruct2"   "int32 *" "valuetype MyStruct *" "method int32 *(int32)" "native int"  "typedref" "typedref\&" "class Template\`1<object>" "valuetype StructTemplate\`1<object>" "valuetype StructTemplate2\`1<object>"
+       for T2 in "int8" "int64" "float64" "object" "string" "class Class" "int32[]" "int32[,]" "valuetype MyStruct" "valuetype MyStruct2"   "int32 *" "valuetype MyStruct *" "method int32 *(int32)" "native int"  "typedref" "class Template\`1<object>" "valuetype StructTemplate\`1<object>" "valuetype StructTemplate2\`1<object>"
        do 
                ./make_ldobj_test.sh ldobj_${I} unverifiable "${T1}" "${T2}"
                I=`expr $I + 1`
        done
 done
 
+for T1 in "native int" "int8*" "typedref" 
+do
+       ./make_ldobj_test.sh ldobj_${I} invalid "${T1}" "typedref\&"
+       I=`expr $I + 1`
+done
 
 
 
@@ -2550,7 +2564,7 @@ I=1
 for TYPE1 in "int8" "bool" "int16" "char" "int32" "int64" "float64" "native int" "object" "string" "class Class" "valuetype MyStruct"  "int32[]" "int32[,]" "int32*" "method int32 *(int32)"  "class Template\`1<object>"
 do
        ./make_store_indirect_test.sh indirect_store_bad_addr_r4_${I} unverifiable "stind.r4" "${TYPE1}\&" "float32"
-       if [ "$TYPE1" == "float64" ]; then
+       if [ "$TYPE1" = "float64" ]; then
                ./make_store_indirect_test.sh indirect_store_good_val_r4_${I} valid "stind.r4" "float32\&" "${TYPE1}"
        else
                ./make_store_indirect_test.sh indirect_store_bad_val_r4_${I} unverifiable "stind.r4" "float32\&" "${TYPE1}"
@@ -2563,7 +2577,7 @@ I=1
 for TYPE1 in "int8" "bool" "int16" "char" "int32" "int64" "float32" "native int" "object" "string" "class Class" "valuetype MyStruct"  "int32[]" "int32[,]" "int32*" "method int32 *(int32)"  "class Template\`1<object>"
 do
        ./make_store_indirect_test.sh indirect_store_bad_addr_r8_${I} unverifiable "stind.r8" "${TYPE1}\&" "float64"
-       if [ "$TYPE1" == "float32" ]; then
+       if [ "$TYPE1" = "float32" ]; then
                ./make_store_indirect_test.sh indirect_store_good_val_r8_${I} valid "stind.r8" "float64\&" "${TYPE1}";
        else
                ./make_store_indirect_test.sh indirect_store_bad_val_r8_${I} unverifiable "stind.r8" "float64\&" "${TYPE1}";
@@ -2761,7 +2775,7 @@ done
 
 
 I=1
-for ARR in "int8" "bool" "unsigned int8"
+for ARR in "int8" "bool" "unsigned int8" "ByteEnum"
 do
        ./make_ldelem_test.sh ldelem_base_types_i_${I} valid "newarr ${ARR}" "ldc.i4.0" "ldelem.i1"
        ./make_ldelem_test.sh ldelem_base_types_u_${I} valid "newarr ${ARR}" "ldc.i4.0" "ldelem.u1"
@@ -2776,7 +2790,7 @@ do
 done
 
 
-for ARR in "int16" "char" "unsigned int16"
+for ARR in "int16" "char" "unsigned int16" "ShortEnum"
 do
        ./make_ldelem_test.sh ldelem_base_types_i_${I} valid "newarr ${ARR}" "ldc.i4.0" "ldelem.i2"
        ./make_ldelem_test.sh ldelem_base_types_u_${I} valid "newarr ${ARR}" "ldc.i4.0" "ldelem.u2"
@@ -2790,11 +2804,18 @@ do
        I=`expr $I + 1`
 done
 
-
-for ARR in "int32" "unsigned int32" "native int" "native unsigned int"
+for ARR in "int32" "unsigned int32" "IntEnum" 
 do
        ./make_ldelem_test.sh ldelem_base_types_i_${I} valid "newarr ${ARR}" "ldc.i4.0" "ldelem.i4"
        ./make_ldelem_test.sh ldelem_base_types_u_${I} valid "newarr ${ARR}" "ldc.i4.0" "ldelem.u4"
+       ./make_ldelem_test.sh ldelem_base_types_n_${I} strict "newarr ${ARR}" "ldc.i4.0" "ldelem.i"
+       I=`expr $I + 1`
+done
+
+for ARR in "native int" "native unsigned int" "NativeIntEnum"
+do
+       ./make_ldelem_test.sh ldelem_base_types_i_${I} strict "newarr ${ARR}" "ldc.i4.0" "ldelem.i4"
+       ./make_ldelem_test.sh ldelem_base_types_u_${I} strict "newarr ${ARR}" "ldc.i4.0" "ldelem.u4"
        ./make_ldelem_test.sh ldelem_base_types_n_${I} valid "newarr ${ARR}" "ldc.i4.0" "ldelem.i"
        I=`expr $I + 1`
 done
@@ -2808,7 +2829,7 @@ do
 done
 
 
-for ARR in "int64" "unsigned int64"
+for ARR in "int64" "unsigned int64" "LongEnum"
 do
        ./make_ldelem_test.sh ldelem_base_types_i_${I} valid "newarr ${ARR}" "ldc.i4.0" "ldelem.i8"
        ./make_ldelem_test.sh ldelem_base_types_u_${I} valid "newarr ${ARR}" "ldc.i4.0" "ldelem.u8"
@@ -3142,13 +3163,20 @@ done
 #token
 
 I=1
-for TOKEN in int32 int64 float32 float64 "valuetype MyStruct" "int32*" "typedref" "int32[]" "string" "method int32 *(int32)"
+for TOKEN in int32 int64 float32 float64 "valuetype MyStruct" "int32[]" "string"
 do
        ./make_cast_test.sh cast_token_${I} valid "object" "ldloc.0" "castclass $TOKEN"
        ./make_cast_test.sh isinst_token_${I} valid "object" "ldloc.0" "isinst $TOKEN"
        I=`expr $I + 1`
 done
 
+for TOKEN in "int32*" "method int32 *(int32)" "typedref"
+do
+       ./make_cast_test.sh cast_token_${I} unverifiable "object" "ldloc.0" "castclass $TOKEN"
+       ./make_cast_test.sh isinst_token_${I} unverifiable "object" "ldloc.0" "isinst $TOKEN"
+       I=`expr $I + 1`
+done
+
 for TOKEN in "int32\&"
 do
        ./make_cast_test.sh cast_token_${I} invalid "object" "ldloc.0" "castclass $TOKEN"
@@ -3195,30 +3223,34 @@ done
 
 # Exception block branch tests (see 2.19)
 
-for I in {1..2};
+I=1; while [ $I -le 2 ]
 do
        ./make_rethrow_test.sh rethrow_from_catch_${I} invalid ${I}
+       I=$((I + 1))
 done
 
-for I in {3..10};
+I=3; while [ $I -le 10 ]
 do
        ./make_rethrow_test.sh rethrow_from_catch_${I} valid ${I}
+       I=$((I + 1))
 done
 
 
 
 # endfinally / endfault
 
-for I in {1..7};
+I=1; while [ $I -le 7 ]
 do
        ./make_endfinally_test.sh endfinally_block_${I} invalid finally ${I}
        ./make_endfinally_test.sh endfault_block_${I} invalid fault ${I}
+       I=$((I + 1))
 done
 
-for I in {8..9};
+I=8; while [ $I -le 9 ]
 do
        ./make_endfinally_test.sh endfinally_block_${I} valid finally ${I}
        ./make_endfinally_test.sh endfault_block_${I} valid fault ${I}
+       I=$((I + 1))
 done
 
 #stack can have stuff and endfinally or endfault will just empty it
@@ -3240,7 +3272,7 @@ done
 ./make_endfilter_test.sh endfilter_inside_protected_block_3 invalid 3 "ldc.i4.1\n\t\tendfilter"
 ./make_endfilter_test.sh endfilter_inside_protected_block_5 strict 5 "ldc.i4.1\n\t\tendfilter"
 
-for I in {2,4,6};
+for I in 2 4 6;
 do
        ./make_endfilter_test.sh endfilter_inside_protected_block_${I} unverifiable ${I} "ldc.i4.1\n\t\tendfilter"
 done
@@ -3274,9 +3306,9 @@ EXTRA="ldloc.0\n\tbrfalse END"
 ./make_leave_test.sh "filter_block_test_1" valid "1" "leave END" "$EXTRA"
 
 #but not ok to leave finally or filter
-for I in {2..3};
-do
+I=2; while [ $I -le 3 ]; do
        ./make_leave_test.sh "filter_block_test_${I}" unverifiable "${I}" "leave END" "${EXTRA}_${I}"
+       I=$((I + 1))
 done
 
 #neither is to branch to invalid regions of code
@@ -3286,24 +3318,27 @@ done
 
 # br.X
 #valid tests
-for I in {1..6}; do
+I=1; while [ $I -le 6 ]; do
        ./make_branch_test.sh branch_inside_same_block_${I} valid ${I} "br BLOCK_${I}";
        ./make_branch_test.sh branch_inside_same_block_${I}_s valid ${I} "br.s BLOCK_${I}";
+       I=$((I + 1))
 done
 
 #branching outside of the protected block
-for I in {2..6}; do
+I=2; while [ $I -le 6 ]; do
        ./make_branch_test.sh branch_outside_protected_block_${I} unverifiable ${I} "br END";
+       I=$((I + 1))
 done
 
 #branching to a protected block from the outside
-for I in {2..6}; do
-       if [ "$I" == "4" ]; then
+I=2; while [ $I -le 6 ]; do
+       if [ $I -eq 4 ]; then
                ./make_branch_test.sh branch_inside_protected_block_from_outside_${I}_finally invalid 1 "br BLOCK_${I}" "finally";
                ./make_branch_test.sh branch_inside_protected_block_from_outside_${I}_fault invalid 1 "br BLOCK_${I}" "fault";
        else
                ./make_branch_test.sh branch_inside_protected_block_from_outside_${I} unverifiable 1 "br BLOCK_${I}";
        fi
+       I=$((I + 1))
 done
 
 
@@ -3321,25 +3356,28 @@ done
 #TODO test the encoding of the switch table
 # switch
 #valid tests
-for I in {1..6}; do
+I=1; while [ $I -le 6 ]; do
        ./make_switch_test.sh switch_inside_same_block_${I} valid ${I} "ldloc.0" "switch (BLOCK_${I}, BLOCK_${I}_B)";
+       I=$((I + 1))
 done
 
 ./make_switch_test.sh switch_with_native_int_on_stack valid 1 "ldloc.1" "switch (BLOCK_1, BLOCK_1_B)";
 
 #branching outside of the protected block
-for I in {2..6}; do
+I=2; while [ $I -le 6 ]; do
        ./make_switch_test.sh switch_outside_protected_block_${I} unverifiable ${I} "ldloc.0" "switch (END, BLOCK_1, BLOCK_1_B)";
+       I=$((I + 1))
 done
 
 #branching to a protected block from the outside
-for I in {2..6}; do
-       if [ "$I" == "4" ]; then
+I=2; while [ $I -le 6 ]; do
+       if [ $I -eq 4 ]; then
                ./make_switch_test.sh switch_inside_protected_block_from_outside_${I}_finally invalid 1 "ldloc.0" "switch (BLOCK_${I}, BLOCK_${I}_B)" "finally";
                ./make_switch_test.sh switch_inside_protected_block_from_outside_${I}_fault invalid 1 "ldloc.0" "switch (BLOCK_${I}, BLOCK_${I}_B)" "fault";
        else
                ./make_switch_test.sh switch_inside_protected_block_from_outside_${I} unverifiable 1 "ldloc.0" "switch (BLOCK_${I}, BLOCK_${I}_B)";
        fi
+       I=$((I + 1))
 done
 
 #TODO branching out of range (FIX ilasm first)
@@ -3376,7 +3414,7 @@ done
 
 ./make_exception_overlap_test.sh exception_entry_overlap_try_over_filter invalid ".try TRY_BLOCK_1 to FILTER_BLOCK_3_A filter FILTER_BLOCK_3 handler CATCH_BLOCK_1 to CATCH_BLOCK_1_END" ".try TRY_BLOCK_2 to TRY_BLOCK_2_END catch [mscorlib]System.Exception handler CATCH_BLOCK_2 to CATCH_BLOCK_2_END" "yes"
 
-#blocks start in the middle of an intruction
+#blocks start in the middle of an instruction
 ./make_exception_overlap_test.sh try_block_start_in_the_middle_of_a_instruction invalid ".try AFTER_PREFIX_1 to TRY_BLOCK_1_END catch [mscorlib]System.Exception handler CATCH_BLOCK_1 to CATCH_BLOCK_1_END" ".try TRY_BLOCK_2 to TRY_BLOCK_2_END catch [mscorlib]System.Exception handler CATCH_BLOCK_2 to CATCH_BLOCK_2_END"
 
 ./make_exception_overlap_test.sh catch_block_start_in_the_middle_of_a_instruction invalid ".try TRY_BLOCK_1 to TRY_BLOCK_1_END catch [mscorlib]System.Exception handler AFTER_PREFIX_2 to CATCH_BLOCK_1_END" ".try TRY_BLOCK_2 to TRY_BLOCK_2_END catch [mscorlib]System.Exception handler CATCH_BLOCK_2 to CATCH_BLOCK_2_END"
@@ -3649,13 +3687,13 @@ do
 done
 
 
-for TYPE in "int32*" "typedref" "method int32 *(int32)"
+for TYPE in "int32*" "method int32 *(int32)"
 do
        ./make_stobj_test.sh stobj_simple_${I} unverifiable "$TYPE" "$TYPE\&" "$TYPE" 
        I=`expr $I + 1`
 done
 
-for TYPE in "int32\&" "void"
+for TYPE in "int32\&" "void" "typedref"
 do
        ./make_stobj_test.sh stobj_simple_${I} invalid "$TYPE" "$TYPE\&" "$TYPE" 
        I=`expr $I + 1`
@@ -3773,14 +3811,14 @@ do
 done
 
 #should be able to use unmanaged types
-for TYPE in "int32*" "typedref" "method int32 *(int32)"
+for TYPE in "int32*" "method int32 *(int32)"
 do
        ./make_cpobj_test.sh cpobj_simple_${I} unverifiable "${TYPE}\&" "${TYPE}\&" "${TYPE}"
        I=`expr $I + 1`
 done
 
 #should be able to use invalid types
-for TYPE in "int32\&" "void"
+for TYPE in "int32\&" "void" "typedref"
 do
        ./make_cpobj_test.sh cpobj_simple_${I} invalid "${TYPE}\&" "${TYPE}\&" "${TYPE}"
        I=`expr $I + 1`
@@ -3813,12 +3851,14 @@ done
 
 #bad token type
 I=1
-for TYPE in "int32\&" "void"
+for TYPE in "int32\&"
 do
        ./make_cpobj_test.sh cpobj_bad_token_type_${I} invalid "int32\&" "int32\&" "${TYPE}"
        I=`expr $I + 1`
 done
 
+./make_cpobj_test.sh cpobj_bad_token_type_2 badmd "int32\&" "int32\&" "void"
+
 #src compat to token
 ./make_cpobj_test.sh cpobj_src_compat_1 valid "int32\&" "int32\&" "native int"
 ./make_cpobj_test.sh cpobj_src_compat_2 valid "native int\&" "int32\&" "int32"
@@ -3946,7 +3986,8 @@ do
 
        ./make_call_test.sh call_${I}_non_virtual_compat_this_1 valid "${CTYPE} instance void ClassA::Method1()" "newobj instance void ClassC::.ctor()"
        ./make_call_test.sh call_${I}_non_virtual_compat_this_2 valid "${CTYPE} instance void ClassC::Method1()" "newobj instance void ClassC::.ctor()"
-       ./make_call_test.sh call_${I}_non_virtual_compat_this_3 unverifiable "${CTYPE} instance void ClassC::Method1()" "newobj instance void ClassA::.ctor()"
+#This test passes peverify but fails under MS runtime due to a bug on their implementation of method token resolution.
+       ./make_call_test.sh call_${I}_non_virtual_compat_this_3 valid "${CTYPE} instance void ClassC::Method1()" "newobj instance void ClassA::.ctor()"
 
        ./make_call_test.sh call_${I}_final_virtual_method_1 valid "${CTYPE} instance void ClassC::VirtMethod()" "newobj instance void ClassC::.ctor()"
 
@@ -4005,5 +4046,1120 @@ done
 ./make_call_test.sh callvirt_valuetype_8 valid "callvirt instance int32 [mscorlib]System.Object::GetHashCode()"  "ldloc.0\n\t\tbox MyValueType" "static" "pop"
 
 
+#mkrefany
+./make_mkrefany.sh mkrefany_empty_stack invalid int32 int32 "pop"
+
+./make_mkrefany.sh mkrefany_good_type_1 valid int32 int32
+./make_mkrefany.sh mkrefany_good_type_2 valid int32 "unsigned int32"
+./make_mkrefany.sh mkrefany_good_type_3 valid int32 "native int"
+./make_mkrefany.sh mkrefany_good_type_4 valid object object
+
+./make_mkrefany.sh mkrefany_type_not_compat_1 unverifiable string object
+./make_mkrefany.sh mkrefany_type_not_compat_2 unverifiable int32 int8
+./make_mkrefany.sh mkrefany_type_not_compat_3 unverifiable object string
+
+./make_mkrefany.sh mkrefany_native_int unverifiable int32 int32 "conv.i"
+
+./make_mkrefany.sh mkrefany_bad_type_1 unverifiable int32 int32 "pop\n\t\tldc.i4.0"
+
+./make_mkrefany.sh mkrefany_bad_type_2 invalid int32 "int32\&"
+
+
+#method definition return type validation
+./make_invalid_ret_type.sh ret_type_byref unverifiable "int32\&"
+./make_invalid_ret_type.sh ret_type_typedref unverifiable "typedref"
+./make_invalid_ret_type.sh ret_type_arg_interator unverifiable "valuetype [mscorlib]System.ArgIterator"
+./make_invalid_ret_type.sh ret_type_arg_handle unverifiable "valuetype [mscorlib]System.RuntimeArgumentHandle"
+
+
+
+#delegate compat tests P. II 14.6
+#TODO generic related testss
+
+#for T in {}
+#./make_delegate_compat_test.sh valid
+
+
+#all types
+#int32 int64 "native int" float64 "valuetype MyValueType" "class ClassA" "int8\&" "int16\&" "int32\&" "int64\&" "native int\&" "float32\&" "float64\&" "valuetype MyValueType\&" "class ClassA\&" "int32*" "method int32 *(int32)" "method float32 *(int32)" "method int32 *(float64)" "method vararg int32 *(int32)"
+#verifiable
+#int32 int64 "native int" float64 "valuetype MyValueType" "class ClassA" "int8\&" "int16\&" "int32\&" "int64\&" "native int\&" "float32\&" "float64\&" "valuetype MyValueType\&" "class ClassA\&"
+
+I=1
+for TYPE1 in int32 int64 "native int" float64 "valuetype MyValueType" "class ClassA" "int8\&" "int16\&" "int32\&" "int64\&" "native int\&" "float32\&" "float64\&" "valuetype MyValueType\&" "class ClassA\&"
+do
+       ./make_delegate_compat_test.sh delegate_compat_basic_types_${I} valid int32 int32 "$TYPE1" "$TYPE1"
+       I=`expr $I + 1`
+done
+
+for TYPE1 in "int32*" "method int32 *(int32)" "method float32 *(int32)" "method int32 *(float64)" "method vararg int32 *(int32)"
+do
+       ./make_delegate_compat_test.sh delegate_compat_basic_types_${I} unverifiable int32 int32 "$TYPE1" "$TYPE1"
+       I=`expr $I + 1`
+done
+
+#D is delegate and T is target method
+#arguments
+#3. D:=T if T is a base type or an interface implemented by D. D is not valuetype (primitive, pointers, etc)
+
+./make_delegate_compat_test.sh delegate_super_type_arg_1 valid int32 int32 string object
+./make_delegate_compat_test.sh delegate_super_type_arg_2 valid int32 int32 ImplA InterfaceA
+
+./make_delegate_compat_test.sh delegate_super_type_arg_3 unverifiable int32 int32 object string
+./make_delegate_compat_test.sh delegate_super_type_arg_4 unverifiable int32 int32 InterfaceA ImplA
+
+./make_delegate_compat_test.sh delegate_super_type_arg_5 unverifiable int32 int32 object int32
+./make_delegate_compat_test.sh delegate_super_type_arg_6 unverifiable int32 int32 object "int32\&"
+./make_delegate_compat_test.sh delegate_super_type_arg_7 unverifiable int32 int32 object "object\&"
+
+
+#primitive type size based conversion - don't work with delegates
+./make_delegate_compat_test.sh delegate_primitive_arg_same_size_1 unverifiable int32 int32 "unsigned int32" int32
+./make_delegate_compat_test.sh delegate_primitive_arg_same_size_2 unverifiable int32 int32 "native int" int32
+
+./make_delegate_compat_test.sh delegate_primitive_arg_same_size_3 unverifiable int32 int32 int32 "unsigned int32"
+./make_delegate_compat_test.sh delegate_primitive_arg_same_size_4 unverifiable int32 int32 int32 "native int"
+
+#value types
+./make_delegate_compat_test.sh delegate_valuetype_arg_1 valid int32 int32 "valuetype MyValueType" "valuetype MyValueType"
+./make_delegate_compat_test.sh delegate_valuetype_arg_2 unverifiable int32 int32 "valuetype MyValueType" int32
+
+
+#4. D:=T if both are interfaces and implementation D requires implementation of T (D is a supertype of T)
+./make_delegate_compat_test.sh delegate_super_iface_arg_1 valid int32 int32 InterfaceB InterfaceA
+./make_delegate_compat_test.sh delegate_super_iface_arg_2 unverifiable int32 int32 InterfaceA InterfaceB
+
+
+#5. D[]:=T[] if D:=T and are both vector or both have the same rank
+./make_delegate_compat_test.sh delegate_array_arg_1 valid int32 int32 "int32[]" "int32[]"
+./make_delegate_compat_test.sh delegate_array_arg_2 valid int32 int32 "string[]" "object[]"
+
+./make_delegate_compat_test.sh delegate_array_arg_3 unverifiable int32 int32 "object[]" "object[,]"
+./make_delegate_compat_test.sh delegate_array_arg_4 unverifiable int32 int32 "object[,]" "object[]"
+./make_delegate_compat_test.sh delegate_array_arg_5 unverifiable int32 int32 "object[]" "string[]"
+
+#6. D:=T if both are method pointers and obey this rules for all args and params
+#TODO how can we cook a test that will be verifiable but use such types
+./make_delegate_compat_test.sh delegate_method_ptr_arg_1 unverifiable int32 int32 "method int32 *(float64)" "method int32 *(float64)"
+#no way do say this is invalid
+./make_delegate_compat_test.sh delegate_method_ptr_arg_2 unverifiable int32 int32 "method int32 *(float64)" "method int32 *(int32)"
+#and that is is valid
+./make_delegate_compat_test.sh delegate_method_ptr_arg_2 unverifiable int32 int32 "method int32 *(string)" "method int32 *(object)"
+
+
+#TODO we don't perform proper type load verification
+#./make_delegate_compat_test.sh delegate_void_args invalid int32 int32 void void
+
+./make_delegate_compat_test.sh delegate_enum_args_1 unverifiable int32 int32 Int32Enum int32
+./make_delegate_compat_test.sh delegate_enum_args_2 unverifiable int32 int32 int32 Int32Enum
+
+#TODO check using native method
+./make_delegate_compat_test.sh delegate_pointers_args_1 unverifiable int32 int32 "string*" "object*"
+./make_delegate_compat_test.sh delegate_pointers_args_2 unverifiable int32 int32 "ImplA*" "InterfaceA*"
+./make_delegate_compat_test.sh delegate_pointers_args_3 unverifiable int32 int32 "object*" "string*"
+./make_delegate_compat_test.sh delegate_pointers_args_4 unverifiable int32 int32 "int32*" "int32*"
+
+
+#TODO: 7,8,9 generic related.
+
+#call conv
+./make_delegate_compat_test.sh delegate_bad_cconv_1 unverifiable int32 int32 int32 int32 "default" "vararg"
+#This is invalid because we don't properly decode memberref signatures
+./make_delegate_compat_test.sh delegate_bad_cconv_2 invalid int32 int32 int32 int32 "vararg" " "
+
+#return type
+
+#3. D:=T if D is a basetype or implemented interface of T and T is not a valuetype
+
+./make_delegate_compat_test.sh delegate_super_type_ret_1 valid object string int32 int32
+./make_delegate_compat_test.sh delegate_super_type_ret_2 valid InterfaceA ImplA int32 int32
+
+./make_delegate_compat_test.sh delegate_super_type_ret_3 unverifiable string object int32 int32
+./make_delegate_compat_test.sh delegate_super_type_ret_4 unverifiable ImplA InterfaceA int32 int32
+
+./make_delegate_compat_test.sh delegate_super_type_ret_5 unverifiable object int32 int32 int32
+./make_delegate_compat_test.sh delegate_super_type_ret_6 unverifiable object "int32\&" int32 int32
+./make_delegate_compat_test.sh delegate_super_type_ret_7 unverifiable object "object\&" int32 int32
+
+
+#primitive type size based conversion - don't work with delegates
+./make_delegate_compat_test.sh delegate_primitive_ret_same_size_1 unverifiable "unsigned int32" int32 int32 int32
+./make_delegate_compat_test.sh delegate_primitive_ret_same_size_2 unverifiable "native int" int32 int32 int32
+
+./make_delegate_compat_test.sh delegate_primitive_ret_same_size_3 unverifiable int32 "unsigned int32" int32 int32
+./make_delegate_compat_test.sh delegate_primitive_ret_same_size_4 unverifiable int32 "native int" int32 int32
+
+#value types
+./make_delegate_compat_test.sh delegate_valuetype_ret_1 valid "valuetype MyValueType" "valuetype MyValueType" int32 int32
+./make_delegate_compat_test.sh delegate_valuetype_ret_2 unverifiable "valuetype MyValueType" int32 int32 int32
+./make_delegate_compat_test.sh delegate_valuetype_ret_2 unverifiable int32 "valuetype MyValueType" int32 int32
+
+
+#4. D:=T if both are interfaces and implementation T requires implementation of D (T is a supertype of D)
+./make_delegate_compat_test.sh delegate_super_iface_arg_1 valid InterfaceA InterfaceB int32 int32
+./make_delegate_compat_test.sh delegate_super_iface_arg_2 valid InterfaceA InterfaceA int32 int32
+./make_delegate_compat_test.sh delegate_super_iface_arg_3 unverifiable InterfaceB InterfaceA int32 int32
+
+
+#5. D[]:=T[] if D:=T and are both vector or both have the same rank
+./make_delegate_compat_test.sh delegate_array_ret_1 valid "int32[]" "int32[]" int32 int32
+./make_delegate_compat_test.sh delegate_array_ret_2 valid "object[]" "string[]" int32 int32
+
+./make_delegate_compat_test.sh delegate_array_ret_3 unverifiable "object[]" "object[,]" int32 int32
+./make_delegate_compat_test.sh delegate_array_ret_4 unverifiable "object[,]" "object[]" int32 int32
+./make_delegate_compat_test.sh delegate_array_ret_5 unverifiable "string[]" "object[]" int32 int32
+
+#6. D:=T if both are method pointers and obey this rules for all args and params
+#TODO how can we cook a test that will be verifiable but use such types
+./make_delegate_compat_test.sh delegate_method_ptr_arg_1 unverifiable "method int32 *(float64)" "method int32 *(float64)" int32 int32
+#no way do say this is invalid
+./make_delegate_compat_test.sh delegate_method_ptr_arg_2 unverifiable "method int32 *(float64)" "method int32 *(int32)" int32 int32
+#and that is is valid
+./make_delegate_compat_test.sh delegate_method_ptr_arg_2 unverifiable "method int32 *(object)" "method int32 *(string)" int32 int32
+
+#TODO: 7,8,9 generic related.
+
+
+./make_delegate_compat_test.sh delegate_void_ret valid void void int32 int32
+
+./make_delegate_compat_test.sh delegate_enum_ret_1 unverifiable int32 int32 Int32Enum int32
+./make_delegate_compat_test.sh delegate_enum_ret_2 unverifiable int32 int32 int32 Int32Enum
+
+./make_delegate_compat_test.sh delegate_pointers_ret_1 unverifiable "object*" "string*" int32 int32
+./make_delegate_compat_test.sh delegate_pointers_ret_2 unverifiable "InterfaceA*" "ImplA*" int32 int32
+./make_delegate_compat_test.sh delegate_pointers_ret_3 unverifiable "string*" "object*" int32 int32 
+./make_delegate_compat_test.sh delegate_pointers_ret_4 unverifiable  "int32*" "int32*" int32 int32
+
+
+#pointer tests using native method and not invoking
+./make_delegate_compat_test.sh delegate_method_ptr_pinvoke_arg_1 valid int32 int32 "method int32 *(float64)" "method int32 *(float64)" "" "" "pinvoke"
+#no way do say this is invalid
+./make_delegate_compat_test.sh delegate_method_ptr_pinvoke_arg_2 unverifiable int32 int32 "method int32 *(float64)" "method int32 *(int32)" "" "" "pinvoke"
+
+
+#constrained prefix
+
+#good type tests
+I=1
+for TYPE in object string MyValueType
+do
+       ./make_constrained_test.sh contrained_prefix_basic_types_$I valid "$TYPE" "$TYPE" "callvirt string object::ToString()"
+       I=`expr $I + 1`
+done
+
+#method that exist on the value type
+./make_constrained_test.sh contrained_prefix_basic_types_$I valid "MyValueType" "MyValueType" "callvirt int32 object::GetHashCode()"
+
+
+#mismatch between constrained. type token and this argument
+./make_constrained_test.sh contrained_prefix_type_mismatch_1 unverifiable "object" "string" "callvirt instance int32 object::GetHashCode()"
+./make_constrained_test.sh contrained_prefix_type_mismatch_2 unverifiable "string" "object" "callvirt instance int32 object::GetHashCode()"
+
+./make_constrained_test.sh contrained_prefix_type_mismatch_3 unverifiable "object" "MyValueType" "callvirt instance int32 object::GetHashCode()"
+./make_constrained_test.sh contrained_prefix_type_mismatch_4 unverifiable "MyValueType" "object" "callvirt instance int32 object::GetHashCode()"
+
+#bad contrained token
+./make_constrained_test.sh contrained_prefix_bad_token_1 unverifiable "object" "object&" "callvirt instance int32 object::GetHashCode()"
+./make_constrained_test.sh contrained_prefix_bad_token_1 unverifiable "object*" "object*" "callvirt instance int32 object::GetHashCode()"
+
+#contrained no before a callvirt
+./make_constrained_test.sh contrained_prefix_not_before_a_callvirt invalid "string" "string" "call instance string string::Trim()"
+
+#wrong stack type
+
+./make_constrained_test.sh contrained_prefix_bad_stack_type_1 unverifiable "object" "object" "callvirt instance int32 object::GetHashCode()" "ldloc.0"
+./make_constrained_test.sh contrained_prefix_bad_stack_type_2 unverifiable "object" "object" "callvirt instance int32 object::GetHashCode()" "ldnull"
+./make_constrained_test.sh contrained_prefix_bad_stack_type_3 unverifiable "object" "object" "callvirt instance int32 object::GetHashCode()" "ldc.i4.0"
+
+
+
+#cmmp support
+#ldind.x tests
+I=1
+for TYPE in "ldind.i1 int8" "ldind.u1 int8" "ldind.i2 int16" "ldind.u2 int16" "ldind.i4 int32" "ldind.u4 int32" "ldind.i8 int64" "ldind.u8 int64" "ldind.i native int" "ldind.r4 float32" "ldind.r8 float64"
+do
+       LOAD=`echo $TYPE | cut -d' ' -f 1` 
+       TYPE=`echo $TYPE | cut -d' ' -f 2-` 
+       ./make_cmmp_test.sh cmmp_basic_test_ro_$I valid "readonly. ldelema $TYPE" "$LOAD" "$TYPE"
+       ./make_cmmp_test.sh cmmp_basic_test_ub_$I valid "unbox $TYPE" "$LOAD" "$TYPE"
+       I=`expr $I + 1`
+done
+
+#unbox is only for value types, so cannot be paired with ldind.ref
+./make_cmmp_test.sh cmmp_basic_test_ro_$I valid "readonly. ldelema object" "ldind.ref" "object"
+
+./make_cmmp_test.sh cmmp_basic_test_ro_ldobj valid "readonly. ldelema int32" "ldobj int32" "int32"
+./make_cmmp_test.sh cmmp_basic_test_ub_ldobj valid "unbox int32" "ldobj int32" "int32"
+
+./make_cmmp_test.sh cmmp_basic_test_ro_ldfld valid "readonly. ldelema valuetype MyStruct" "ldfld int32 MyStruct::foo" "valuetype MyStruct"
+./make_cmmp_test.sh cmmp_basic_test_ub_ldfld valid "unbox valuetype MyStruct" "ldfld int32 MyStruct::foo" "valuetype MyStruct "
+
+./make_cmmp_test.sh cmmp_basic_test_ro_ldflda valid "readonly. ldelema valuetype MyStruct" "ldflda int32 MyStruct::foo" "valuetype MyStruct"
+./make_cmmp_test.sh cmmp_basic_test_ub_ldflda valid "unbox valuetype MyStruct" "ldflda int32 MyStruct::foo" "valuetype MyStruct "
+
+#as the object parameter of callvirt, constrained. callvirt
+#ldobj
+
+./make_cmmp_test.sh cmmp_basic_test_ro_stfld_ptr valid "readonly. ldelema valuetype MyStruct" "ldc.i4.0\n\tstfld int32 MyStruct::foo" "valuetype MyStruct"
+./make_cmmp_test.sh cmmp_basic_test_ub_stfld_ptr valid "unbox valuetype MyStruct" "ldc.i4.0\n\tstfld int32 MyStruct::foo" "valuetype MyStruct "
+
+#testing for second argument in stfld is pointless as fields cannot be a byref type
+
+#can be the this ptr for call
+./make_cmmp_test.sh cmmp_basic_test_ro_call_this valid "readonly. ldelema int32" "ldc.i4.0\n\tcall instance int32 int32::CompareTo(int32)" "int32"
+./make_cmmp_test.sh cmmp_basic_test_ub_call_this valid "unbox int32" "ldc.i4.0\n\tcall instance int32 int32::CompareTo(int32)" "int32"
+
+
+#cannot be parameter
+./make_cmmp_test.sh cmmp_basic_test_ro_call_arg unverifiable "readonly. ldelema valuetype MyStruct" "call void MyStruct::Test(MyStruct\&)" "valuetype MyStruct"
+./make_cmmp_test.sh cmmp_basic_test_ub_call_arg unverifiable "unbox valuetype MyStruct" "call void MyStruct::Test(MyStruct\&)" "valuetype MyStruct"
+
+
+#FIXME it's not possible to use a managed pointer with an unconstrained callvirt
+
+#constrained. callvirt
+./make_cmmp_test.sh cmmp_basic_test_ro_callvirt_this valid "readonly. ldelema int32" "constrained. int32 callvirt instance int32 object::GetHashCode()" "int32"
+./make_cmmp_test.sh cmmp_basic_test_ub_callvirt_this valid "unbox int32" "constrained. int32 callvirt instance int32 object::GetHashCode()" "int32"
+
+
+#constrained. callvirt as parameter
+./make_cmmp_test.sh cmmp_basic_test_ro_callvirt_arg unverifiable "readonly. ldelema ClassA" "dup\n\tconstrained. ClassA callvirt instance void ClassA::VirtTest(ClassA\&)" "ClassA"
+
+
+#invalid instructions with cmmp argument
+#test, at least, stobj, cpobj, stind, initobj, mkrefany, newobj, ceq
+
+#stind.x
+I=1
+for TYPE in "stind.i1 int8" "stind.i2 int16" "stind.i4 int32" "stind.i8 int64" "stind.r4 float32" "stind.r8 float64" "stind.i native int"
+do
+       STORE=`echo $TYPE | cut -d' ' -f 1` 
+       TYPE=`echo $TYPE | cut -d' ' -f 2-` 
+       ./make_cmmp_test.sh cmmp_bad_ops_test_ro_$I unverifiable "readonly. ldelema $TYPE" "ldloc.0\n\t$STORE" "$TYPE"
+       ./make_cmmp_test.sh cmmp_bad_ops_test_ub_$I unverifiable "unbox $TYPE" "ldloc.0\n\t$STORE" "$TYPE"
+       I=`expr $I + 1`
+done
+
+#unbox is only for value types, so cannot be paired with ldind.ref
+./make_cmmp_test.sh cmmp_bad_ops_test_ro_$I unverifiable "readonly. ldelema object" "ldloc.0\n\tstind.ref" "object"
+
+
+./make_cmmp_test.sh cmmp_stobj_test_ro unverifiable "readonly. ldelema int32" "ldloc.0\n\tstobj int32" "int32"
+./make_cmmp_test.sh cmmp_stobj_test_ub unverifiable "unbox int32" "ldloc.0\n\tstobj int32" "int32"
+
+./make_cmmp_test.sh cmmp_cpobj_src_ro valid "readonly. ldelema int32" "cpobj int32" "int32" "ldloca 0"
+./make_cmmp_test.sh cmmp_cpobj_src_ub valid "unbox int32" "cpobj int32" "int32" "ldloca 0"
+
+./make_cmmp_test.sh cmmp_cpobj_dst_ro unverifiable "readonly. ldelema int32" "ldloca 0\n\tcpobj int32" "int32"
+./make_cmmp_test.sh cmmp_cpobj_dst_ub unverifiable "unbox int32" "ldloca 0\n\tcpobj int32" "int32"
+
+./make_cmmp_test.sh cmmp_initobj_test_ro unverifiable "readonly. ldelema int32" "initobj int32" "int32"
+./make_cmmp_test.sh cmmp_initobj_test_ub unverifiable "unbox int32" "initobj int32" "int32"
+
+./make_cmmp_test.sh cmmp_mkrefany_test_ro unverifiable "readonly. ldelema int32" "mkrefany int32" "int32"
+./make_cmmp_test.sh cmmp_mkrefany_test_ub unverifiable "unbox int32" "mkrefany int32" "int32"
+
+./make_cmmp_test.sh cmmp_newobj_test_ro unverifiable "readonly. ldelema int32" "newobj instance void class ClassA::.ctor(int32\&)" "int32"
+./make_cmmp_test.sh cmmp_newobj_test_ub unverifiable "unbox int32" "newobj instance void class ClassA::.ctor(int32\&)" "int32"
+
+./make_cmmp_test.sh cmmp_ceq_test_ro valid "readonly. ldelema int32" "dup\n\tceq" "int32"
+./make_cmmp_test.sh cmmp_ceq_test_ub valid "unbox int32" "dup\n\tceq" "int32"
+
+./make_cmmp_test.sh cmmp_basic_test_address_method_1 valid "ldc.i4.1\n\tldc.i4.1\n\tnewobj instance void int32[,]::.ctor(int32, int32)\n\tldc.i4.0\n\tldc.i4.0\n\tcall instance int32\&  int32[,]::Address(int32, int32)" "ldloc.0\n\tstind.i4" "int32"
+
+./make_cmmp_test.sh cmmp_basic_test_address_method_2 unverifiable "ldc.i4.1\n\tldc.i4.1\n\tnewobj instance void int32[,]::.ctor(int32, int32)\n\tldc.i4.0\n\tldc.i4.0\n\treadonly. call instance int32\&  int32[,]::Address(int32, int32)" "ldloc.0\n\tstind.i4" "int32"
+
+
+#readonly before an invalid instruction
+./make_cmmp_test.sh readonly_before_invalid_instruction_1 invalid "readonly. ldelem int32" "nop" "int32"
+./make_cmmp_test.sh readonly_before_invalid_instruction_2 invalid "ldstr \"tst\"\n\treadonly. call string int32::Parse(string)" "nop" "int32"
+
+
+
+#type constraint verification
+#see PII 10.1.7 for details
+
+#TODO test usage of open types
+#TODO test recursive types
+
+I=1
+for TYPE in object ClassNoDefaultCtor AbstractClass ClassWithDefaultCtorNotVisible ClassWithDefaultCtor "valuetype MyValueType" "valuetype [mscorlib]System.Nullable\`1<valuetype MyValueType>" "[mscorlib]System.ValueType" "[mscorlib]System.Enum" IFace IFaceImpl "valuetype MyEnum"
+do
+       ./make_type_constraint_test.sh type_constraint_no_ct_$I valid "$TYPE" ""
+       ./make_type_constraint_test.sh type_constraint_object_ct_$I valid "$TYPE" "(class [mscorlib]System.Object)"
+
+       ./make_method_constraint_test.sh method_constraint_no_ct_$I valid "$TYPE" ""
+       ./make_method_constraint_test.sh method_constraint_object_ct_$I valid "$TYPE" "(class [mscorlib]System.Object)"
+
+       I=`expr $I + 1`
+done
+
+
+I=1
+for TYPE in object ClassNoDefaultCtor AbstractClass ClassWithDefaultCtorNotVisible ClassWithDefaultCtor "[mscorlib]System.ValueType" "[mscorlib]System.Enum" IFace IFaceImpl
+do
+       ./make_type_constraint_test.sh type_constraint_class_ct_$I valid "$TYPE" "class "
+       ./make_type_constraint_test.sh type_constraint_class_object_ct_$I valid "$TYPE" "class (class [mscorlib]System.Object)"
+
+       ./make_method_constraint_test.sh method_constraint_class_ct_$I valid "$TYPE" "class "
+       ./make_method_constraint_test.sh method_constraint_class_object_ct_$I valid "$TYPE" "class (class [mscorlib]System.Object)"
+
+       I=`expr $I + 1`
+done
+
+for TYPE in "valuetype MyValueType" "valuetype [mscorlib]System.Nullable\`1<valuetype MyValueType>" "valuetype MyEnum"
+do
+       ./make_type_constraint_test.sh type_constraint_class_ct_$I invalid "$TYPE" "class "
+       ./make_type_constraint_test.sh type_constraint_class_object_ct_$I invalid "$TYPE" "class (class [mscorlib]System.Object)"
+
+       ./make_method_constraint_test.sh method_constraint_class_ct_$I invalid "$TYPE" "class "
+       ./make_method_constraint_test.sh method_constraint_class_object_ct_$I invalid "$TYPE" "class (class [mscorlib]System.Object)"
+
+       I=`expr $I + 1`
+done
+
+
+I=1
+for TYPE in object AbstractClass ClassWithDefaultCtor IFaceImpl
+do
+       ./make_type_constraint_test.sh type_constraint_class_ctor_ct_$I valid "$TYPE" "class .ctor"
+       ./make_type_constraint_test.sh type_constraint_class_ctor_object_ct_$I valid "$TYPE" "class .ctor(class [mscorlib]System.Object)"
+
+       ./make_method_constraint_test.sh method_constraint_class_ctor_ct_$I valid "$TYPE" "class .ctor"
+       ./make_method_constraint_test.sh method_constraint_class_ctor_object_ct_$I valid "$TYPE" "class .ctor(class [mscorlib]System.Object)"
+
+       I=`expr $I + 1`
+done
+
+for TYPE in ClassNoDefaultCtor ClassWithDefaultCtorNotVisible "valuetype MyValueType" "valuetype [mscorlib]System.Nullable\`1<valuetype MyValueType>" "[mscorlib]System.ValueType" "[mscorlib]System.Enum" IFace "valuetype MyEnum"
+do
+       ./make_type_constraint_test.sh type_constraint_class_ctor_ct_$I invalid "$TYPE" "class .ctor"
+       ./make_type_constraint_test.sh type_constraint_class_ctor_object_ct_$I invalid "$TYPE" "class .ctor(class [mscorlib]System.Object)"
+
+       ./make_method_constraint_test.sh method_constraint_class_ctor_ct_$I invalid "$TYPE" "class .ctor"
+       ./make_method_constraint_test.sh method_constraint_class_ctor_object_ct_$I invalid "$TYPE" "class .ctor(class [mscorlib]System.Object)"
+
+       I=`expr $I + 1`
+done
+
+
+I=1
+for TYPE in object ClassNoDefaultCtor AbstractClass ClassWithDefaultCtorNotVisible ClassWithDefaultCtor "valuetype [mscorlib]System.Nullable\`1<valuetype MyValueType>" "[mscorlib]System.ValueType" "[mscorlib]System.Enum" IFace IFaceImpl
+do
+       ./make_type_constraint_test.sh type_constraint_vt_ct_$I invalid "$TYPE" "valuetype"
+       ./make_type_constraint_test.sh type_constraint_vt_object_ct_$I invalid "$TYPE" "valuetype(class [mscorlib]System.Object)"
+
+       ./make_method_constraint_test.sh method_constraint_vt_ct_$I invalid "$TYPE" "valuetype"
+       ./make_method_constraint_test.sh method_constraint_vt_object_ct_$I invalid "$TYPE" "valuetype(class [mscorlib]System.Object)"
+
+       I=`expr $I + 1`
+done
+
+for TYPE in "valuetype MyValueType" "valuetype MyEnum"
+do
+       ./make_type_constraint_test.sh type_constraint_vt_ct_$I valid "$TYPE" "valuetype"
+       ./make_type_constraint_test.sh type_constraint_vt_object_ct_$I valid "$TYPE" "valuetype(class [mscorlib]System.Object)"
+
+       ./make_method_constraint_test.sh method_constraint_vt_ct_$I valid "$TYPE" "valuetype"
+       ./make_method_constraint_test.sh method_constraint_vt_object_ct_$I valid "$TYPE" "valuetype(class [mscorlib]System.Object)"
+
+       I=`expr $I + 1`
+done
+
+
+I=1
+for TYPE in object ClassNoDefaultCtor AbstractClass ClassWithDefaultCtorNotVisible ClassWithDefaultCtor "valuetype [mscorlib]System.Nullable\`1<valuetype MyValueType>" "[mscorlib]System.ValueType" "[mscorlib]System.Enum" IFace IFaceImpl
+do
+       ./make_type_constraint_test.sh type_constraint_vt_ctor_ct_$I invalid "$TYPE"  "valuetype .ctor"
+       ./make_type_constraint_test.sh type_constraint_vt_ctor_object_ct_$I invalid "$TYPE"  "valuetype .ctor(class [mscorlib]System.Object)"
+
+       ./make_method_constraint_test.sh method_constraint_vt_ctor_ct_$I invalid "$TYPE"  "valuetype .ctor"
+       ./make_method_constraint_test.sh method_constraint_vt_ctor_object_ct_$I invalid "$TYPE"  "valuetype .ctor(class [mscorlib]System.Object)"
+
+       I=`expr $I + 1`
+done
+
+for TYPE in "valuetype MyValueType" "valuetype MyEnum"
+do
+       ./make_type_constraint_test.sh type_constraint_vt_ctor_ct_$I valid "$TYPE"  "valuetype .ctor"
+       ./make_type_constraint_test.sh type_constraint_vt_ctor_object_ct_$I valid "$TYPE"  "valuetype .ctor(class [mscorlib]System.Object)"
+
+       ./make_method_constraint_test.sh method_constraint_vt_ctor_ct_$I valid "$TYPE"  "valuetype .ctor"
+       ./make_method_constraint_test.sh method_constraint_vt_ctor_object_ct_$I valid "$TYPE"  "valuetype .ctor(class [mscorlib]System.Object)"
+
+       I=`expr $I + 1`
+done
+
+
+I=1
+for TYPE in object AbstractClass ClassWithDefaultCtor "valuetype MyValueType" "valuetype [mscorlib]System.Nullable\`1<valuetype MyValueType>" IFaceImpl "valuetype MyEnum"
+do
+       ./make_type_constraint_test.sh type_constraint_ctor_ct_$I valid "$TYPE" ".ctor"
+       ./make_type_constraint_test.sh type_constraint_ctor_object_ct_$I valid "$TYPE" ".ctor(class [mscorlib]System.Object)"
+
+       ./make_method_constraint_test.sh method_constraint_ctor_ct_$I valid "$TYPE" ".ctor"
+       ./make_method_constraint_test.sh method_constraint_ctor_object_ct_$I valid "$TYPE" ".ctor(class [mscorlib]System.Object)"
+
+       I=`expr $I + 1`
+done
+
+for TYPE in ClassNoDefaultCtor ClassWithDefaultCtorNotVisible "[mscorlib]System.ValueType" "[mscorlib]System.Enum" IFace
+do
+       ./make_type_constraint_test.sh type_constraint_ctor_ct_$I invalid "$TYPE" ".ctor"
+       ./make_type_constraint_test.sh type_constraint_ctor_object_ct_$I invalid "$TYPE" ".ctor(class [mscorlib]System.Object)"
+
+       ./make_method_constraint_test.sh method_constraint_ctor_ct_$I invalid "$TYPE" ".ctor"
+       ./make_method_constraint_test.sh method_constraint_ctor_object_ct_$I invalid "$TYPE" ".ctor(class [mscorlib]System.Object)"
+
+       I=`expr $I + 1`
+done
+
+
+I=1
+for TYPE in object ClassNoDefaultCtor AbstractClass ClassWithDefaultCtorNotVisible ClassWithDefaultCtor "valuetype MyValueType" "valuetype [mscorlib]System.Nullable\`1<valuetype MyValueType>" "[mscorlib]System.ValueType" "[mscorlib]System.Enum" IFace IFaceImpl "valuetype MyEnum"
+do
+       ./make_type_constraint_test.sh type_constraint_class_vt_ct_$I invalid "$TYPE" "class valuetype"
+       ./make_type_constraint_test.sh type_constraint_class_vt_object_ct_$I invalid "$TYPE" "class valuetype(class [mscorlib]System.Object)"
+
+       ./make_method_constraint_test.sh method_constraint_class_vt_ct_$I invalid "$TYPE" "class valuetype"
+       ./make_method_constraint_test.sh method_constraint_class_vt_object_ct_$I invalid "$TYPE" "class valuetype(class [mscorlib]System.Object)"
+
+       I=`expr $I + 1`
+done
+
+I=1
+for TYPE in ClassNoDefaultCtor AbstractClass ClassWithDefaultCtorNotVisible "[mscorlib]System.ValueType" "[mscorlib]System.Enum" IFace
+do
+       ./make_type_constraint_test.sh type_constraint_class_vt_ctor_ct_$I invalid "$TYPE" "class valuetype .ctor"
+       ./make_type_constraint_test.sh type_constraint_class_vt_ctor_object_ct_$I invalid "$TYPE" "class valuetype .ctor(class [mscorlib]System.Object)"
+
+       ./make_method_constraint_test.sh method_constraint_class_vt_ctor_ct_$I invalid "$TYPE" "class valuetype .ctor"
+       ./make_method_constraint_test.sh method_constraint_class_vt_ctor_object_ct_$I invalid "$TYPE" "class valuetype .ctor(class [mscorlib]System.Object)"
+
+       I=`expr $I + 1`
+done
+
+
+
+I=1
+for TYPE in "valuetype MyValueType" "valuetype [mscorlib]System.Nullable\`1<valuetype MyValueType>" "valuetype MyEnum"
+do
+       ./make_type_constraint_test.sh type_constraint_system_valuetype_ctor_ct_$I valid "$TYPE" ".ctor (class [mscorlib]System.ValueType)"
+
+       ./make_method_constraint_test.sh method_constraint_system_valuetype_ctor_ct_$I valid "$TYPE" ".ctor (class [mscorlib]System.ValueType)"
+
+       I=`expr $I + 1`
+done
+
+for TYPE in object ClassNoDefaultCtor AbstractClass ClassWithDefaultCtorNotVisible ClassWithDefaultCtor "[mscorlib]System.ValueType" "[mscorlib]System.Enum" IFace IFaceImpl
+do
+       ./make_type_constraint_test.sh type_constraint_system_valuetype_ctor_ct_$I invalid "$TYPE" ".ctor (class [mscorlib]System.ValueType)"
+
+       ./make_method_constraint_test.sh method_constraint_system_valuetype_ctor_ct_$I invalid "$TYPE" ".ctor (class [mscorlib]System.ValueType)"
+
+       I=`expr $I + 1`
+done
+
+
+I=1
+for TYPE in "valuetype MyValueType" "valuetype MyEnum"
+do
+       ./make_type_constraint_test.sh type_constraint_system_valuetype_vt_ct_$I valid "$TYPE" "valuetype(class [mscorlib]System.ValueType)"
+
+       ./make_method_constraint_test.sh method_constraint_system_valuetype_vt_ct_$I valid "$TYPE" "valuetype(class [mscorlib]System.ValueType)"
+
+       I=`expr $I + 1`
+done
+
+for TYPE in object ClassNoDefaultCtor AbstractClass ClassWithDefaultCtorNotVisible ClassWithDefaultCtor  "valuetype [mscorlib]System.Nullable\`1<valuetype MyValueType>" "[mscorlib]System.ValueType" "[mscorlib]System.Enum" IFace IFaceImpl
+do
+       ./make_type_constraint_test.sh type_constraint_system_valuetype_vt_ct_$I invalid "$TYPE" "valuetype(class [mscorlib]System.ValueType)"
+
+       ./make_method_constraint_test.sh method_constraint_system_valuetype_vt_ct_$I invalid "$TYPE" "valuetype(class [mscorlib]System.ValueType)"
+
+       I=`expr $I + 1`
+done
+
+
+I=1
+for TYPE in "valuetype MyValueType" "valuetype MyEnum"
+do
+       ./make_type_constraint_test.sh type_constraint_system_valuetype_vt_ctor_ct_$I valid "$TYPE" "valuetype .ctor(class [mscorlib]System.ValueType)"
+
+       ./make_method_constraint_test.sh method_constraint_system_valuetype_vt_ctor_ct_$I valid "$TYPE" "valuetype .ctor(class [mscorlib]System.ValueType)"
+
+       I=`expr $I + 1`
+done
+
+for TYPE in object ClassNoDefaultCtor AbstractClass ClassWithDefaultCtorNotVisible ClassWithDefaultCtor "valuetype [mscorlib]System.Nullable\`1<valuetype MyValueType>" "[mscorlib]System.ValueType" "[mscorlib]System.Enum" IFace IFaceImpl
+do
+       ./make_type_constraint_test.sh type_constraint_system_valuetype_vt_ctor_ct_$I invalid "$TYPE" "valuetype .ctor(class [mscorlib]System.ValueType)"
+
+       ./make_method_constraint_test.sh method_constraint_system_valuetype_vt_ctor_ct_$I invalid "$TYPE" "valuetype .ctor(class [mscorlib]System.ValueType)"
+
+       I=`expr $I + 1`
+done
+
+
+I=1
+for TYPE in "valuetype MyValueType" "valuetype [mscorlib]System.Nullable\`1<valuetype MyValueType>" "[mscorlib]System.ValueType" "[mscorlib]System.Enum"  "valuetype MyEnum"
+do
+       ./make_type_constraint_test.sh type_constraint_system_valuetype_ct_$I valid "$TYPE" "(class [mscorlib]System.ValueType)"
+
+       ./make_method_constraint_test.sh method_constraint_system_valuetype_ct_$I valid "$TYPE" "(class [mscorlib]System.ValueType)"
+
+       I=`expr $I + 1`
+done
+
+for TYPE in object ClassNoDefaultCtor AbstractClass ClassWithDefaultCtorNotVisible ClassWithDefaultCtor IFace IFaceImpl
+do
+       ./make_type_constraint_test.sh type_constraint_system_valuetype_ct_$I invalid "$TYPE" "(class [mscorlib]System.ValueType)"
+
+       ./make_method_constraint_test.sh method_constraint_system_valuetype_ct_$I invalid "$TYPE" "(class [mscorlib]System.ValueType)"
+
+       I=`expr $I + 1`
+done
+
+
+I=1
+for TYPE in object ClassNoDefaultCtor AbstractClass ClassWithDefaultCtorNotVisible ClassWithDefaultCtor "valuetype MyValueType" "valuetype [mscorlib]System.Nullable\`1<valuetype MyValueType>" IFace IFaceImpl "valuetype MyEnum"
+do
+       ./make_type_constraint_test.sh type_constraint_system_valuetype_class_ct_$I invalid "$TYPE" "class (class [mscorlib]System.ValueType)"
+
+       ./make_method_constraint_test.sh method_constraint_system_valuetype_class_ct_$I invalid "$TYPE" "class (class [mscorlib]System.ValueType)"
+
+       I=`expr $I + 1`
+done
+
+for TYPE in "[mscorlib]System.ValueType" "[mscorlib]System.Enum"
+do
+       ./make_type_constraint_test.sh type_constraint_system_valuetype_class_ct_$I valid "$TYPE" "class (class [mscorlib]System.ValueType)"
+
+       ./make_method_constraint_test.sh method_constraint_system_valuetype_class_ct_$I valid "$TYPE" "class (class [mscorlib]System.ValueType)"
+
+       I=`expr $I + 1`
+done
+
+
+I=1
+for TYPE in object ClassNoDefaultCtor AbstractClass ClassWithDefaultCtorNotVisible ClassWithDefaultCtor "valuetype MyValueType" "valuetype [mscorlib]System.Nullable\`1<valuetype MyValueType>" "[mscorlib]System.ValueType" "[mscorlib]System.Enum" IFace IFaceImpl "valuetype MyEnum"
+do
+       ./make_type_constraint_test.sh type_constraint_system_valuetype_class_ctor_ct_$I invalid "$TYPE" "class .ctor(class [mscorlib]System.ValueType)"
+
+       ./make_method_constraint_test.sh method_constraint_system_valuetype_class_ctor_ct_$I invalid "$TYPE" "class .ctor(class [mscorlib]System.ValueType)"
+
+       I=`expr $I + 1`
+done
+
+
+
+I=1
+for TYPE in "valuetype MyEnum"
+do
+       ./make_type_constraint_test.sh type_constraint_system_enum_ctor_ct_$I valid "$TYPE" ".ctor (class [mscorlib]System.Enum)"
+       ./make_type_constraint_test.sh type_constraint_system_enum_vt_ct_$I valid "$TYPE" "valuetype (class [mscorlib]System.Enum)"
+       ./make_type_constraint_test.sh type_constraint_system_enum_vt_ctor_ct_$I valid "$TYPE" "valuetype .ctor(class [mscorlib]System.Enum)"
+
+       ./make_method_constraint_test.sh method_constraint_system_enum_ctor_ct_$I valid "$TYPE" ".ctor (class [mscorlib]System.Enum)"
+       ./make_method_constraint_test.sh method_constraint_system_enum_vt_ct_$I valid "$TYPE" "valuetype (class [mscorlib]System.Enum)"
+       ./make_method_constraint_test.sh method_constraint_system_enum_vt_ctor_ct_$I valid "$TYPE" "valuetype .ctor(class [mscorlib]System.Enum)"
+
+       I=`expr $I + 1`
+done
+
+for TYPE in object ClassNoDefaultCtor AbstractClass ClassWithDefaultCtorNotVisible ClassWithDefaultCtor "valuetype MyValueType" "valuetype [mscorlib]System.Nullable\`1<valuetype MyValueType>" "[mscorlib]System.ValueType" "[mscorlib]System.Enum" IFace IFaceImpl 
+do
+       ./make_type_constraint_test.sh type_constraint_system_enum_ctor_ct_$I invalid "$TYPE" ".ctor (class [mscorlib]System.Enum)"
+       ./make_type_constraint_test.sh type_constraint_system_enum_vt_ct_$I invalid "$TYPE" "valuetype (class [mscorlib]System.Enum)"
+       ./make_type_constraint_test.sh type_constraint_system_enum_vt_ctor_ct_$I invalid "$TYPE" "valuetype .ctor(class [mscorlib]System.Enum)"
+
+       ./make_method_constraint_test.sh method_constraint_system_enum_ctor_ct_$I invalid "$TYPE" ".ctor (class [mscorlib]System.Enum)"
+       ./make_method_constraint_test.sh method_constraint_system_enum_vt_ct_$I invalid "$TYPE" "valuetype (class [mscorlib]System.Enum)"
+       ./make_method_constraint_test.sh method_constraint_system_enum_vt_ctor_ct_$I invalid "$TYPE" "valuetype .ctor(class [mscorlib]System.Enum)"
+
+       I=`expr $I + 1`
+done
+
+
+I=1
+for TYPE in "[mscorlib]System.Enum" "valuetype MyEnum"
+do
+       ./make_type_constraint_test.sh type_constraint_system_enum_ct_$I valid "$TYPE" "(class [mscorlib]System.Enum)"
+
+       ./make_method_constraint_test.sh method_constraint_system_enum_ct_$I valid "$TYPE" "(class [mscorlib]System.Enum)"
+
+       I=`expr $I + 1`
+done
+
+for TYPE in object ClassNoDefaultCtor AbstractClass ClassWithDefaultCtorNotVisible ClassWithDefaultCtor "valuetype MyValueType" "valuetype [mscorlib]System.Nullable\`1<valuetype MyValueType>" "[mscorlib]System.ValueType" IFace IFaceImpl
+do
+       ./make_type_constraint_test.sh type_constraint_system_enum_ct_$I invalid "$TYPE" "(class [mscorlib]System.Enum)"
+
+       ./make_method_constraint_test.sh method_constraint_system_enum_ct_$I invalid "$TYPE" "(class [mscorlib]System.Enum)"
+
+       I=`expr $I + 1`
+done
+
+
+I=1
+for TYPE in "[mscorlib]System.Enum"
+do
+       ./make_type_constraint_test.sh type_constraint_system_enum_class_ct_$I valid "$TYPE" "class (class [mscorlib]System.Enum)"
+
+       ./make_method_constraint_test.sh method_constraint_system_enum_class_ct_$I valid "$TYPE" "class (class [mscorlib]System.Enum)"
+
+       I=`expr $I + 1`
+done
+
+for TYPE in object ClassNoDefaultCtor AbstractClass ClassWithDefaultCtorNotVisible ClassWithDefaultCtor "valuetype MyValueType" "valuetype [mscorlib]System.Nullable\`1<valuetype MyValueType>" "[mscorlib]System.ValueType" IFace IFaceImpl "valuetype MyEnum"
+do
+       ./make_type_constraint_test.sh type_constraint_system_enum_class_ct_$I invalid "$TYPE" "class (class [mscorlib]System.Enum)"
+
+       ./make_method_constraint_test.sh method_constraint_system_enum_class_ct_$I invalid "$TYPE" "class (class [mscorlib]System.Enum)"
+
+       I=`expr $I + 1`
+done
+
+
+I=1
+for TYPE in object ClassNoDefaultCtor AbstractClass ClassWithDefaultCtorNotVisible ClassWithDefaultCtor "valuetype MyValueType" "valuetype [mscorlib]System.Nullable\`1<valuetype MyValueType>" "[mscorlib]System.ValueType" "[mscorlib]System.Enum" IFace IFaceImpl "valuetype MyEnum"
+do
+       ./make_type_constraint_test.sh type_constraint_system_enum_class_ctor_ct_$I invalid "$TYPE" "class .ctor(class [mscorlib]System.Enum)"
+
+       ./make_method_constraint_test.sh method_constraint_system_enum_class_ctor_ct_$I invalid "$TYPE" "class .ctor(class [mscorlib]System.Enum)"
+
+       I=`expr $I + 1`
+done
+
+
+I=1
+for TYPE in IFace IFaceImpl
+do
+       ./make_type_constraint_test.sh type_constraint_iface_ct_$I valid "$TYPE" "(IFace)"
+
+       ./make_method_constraint_test.sh method_constraint_iface_ct_$I valid "$TYPE" "(IFace)"
+
+       I=`expr $I + 1`
+done
+
+for TYPE in object ClassNoDefaultCtor AbstractClass ClassWithDefaultCtorNotVisible ClassWithDefaultCtor "valuetype MyValueType" "valuetype [mscorlib]System.Nullable\`1<valuetype MyValueType>" "[mscorlib]System.ValueType" "[mscorlib]System.Enum" "valuetype MyEnum"
+do
+       ./make_type_constraint_test.sh type_constraint_iface_ct_$I invalid "$TYPE" "(IFace)"
+
+       ./make_method_constraint_test.sh method_constraint_iface_ct_$I invalid "$TYPE" "(IFace)"
+
+       I=`expr $I + 1`
+done
+
+#misc tests
+./make_type_constraint_test.sh type_constraint_nested_class invalid "class TemplateTarget<valuetype MyValueType>" "class"
+
+
+#prefixes volatile. and unaligned
+
+#stind.x
+I=1
+for TYPE in "stind.i1 int8" "stind.i2 int16" "stind.i4 int32" "stind.i8 int64" "stind.r4 float32" "stind.r8 float64" "stind.i native int"
+do
+       STORE=`echo $TYPE | cut -d' ' -f 1` 
+       TYPE=`echo $TYPE | cut -d' ' -f 2-` 
+       ./make_prefix_test.sh "prefix_test_stind_volatile_$I" valid "volatile. $STORE" "ldloca 0\n\tldloc.0" "$TYPE"
+       ./make_prefix_test.sh "prefix_test_stind_unaligned_$I" valid  "unaligned. 1 $STORE" "ldloca 0\n\tldloc.0" "$TYPE"
+       I=`expr $I + 1`
+done
+
+./make_prefix_test.sh "prefix_test_stind_volatile_$I" valid "volatile. stind.ref" "ldloca 0\n\tldnull" "object"
+./make_prefix_test.sh "prefix_test_stind_unaligned_$I" valid  "unaligned. 1 stind.ref" "ldloca 0\n\tldnull" "object"
+
+
+#ldind.x
+I=1
+for TYPE in "ldind.i1 int8" "ldind.u1 unsigned int8" "ldind.i2 int16" "ldind.u2 unsigned int16" "ldind.i4 int32" "ldind.u4 unsigned int32" "ldind.i8 int64" "ldind.u8 unsigned int64" "ldind.r4 float32" "ldind.r8 float64" "ldind.i native int"
+do
+       STORE=`echo $TYPE | cut -d' ' -f 1` 
+       TYPE=`echo $TYPE | cut -d' ' -f 2-` 
+       ./make_prefix_test.sh "prefix_test_ldind_volatile_$I" valid "volatile. $STORE" "ldloca 0" "$TYPE"
+       ./make_prefix_test.sh "prefix_test_ldind_unaligned_$I" valid  "unaligned. 1 $STORE" "ldloca 0" "$TYPE"
+       I=`expr $I + 1`
+done
+
+./make_prefix_test.sh "prefix_test_ldind_volatilee_$I" valid "volatile. ldind.ref" "ldloca 0" "object"
+./make_prefix_test.sh "prefix_test_ldind_unalignede_$I" valid  "unaligned. 1 ldind.ref" "ldloca 0" "object"
+
+
+./make_prefix_test.sh "prefix_test_ldfld_volatile" valid "volatile. ldfld int32 MyStruct::foo" "ldloca 0" "MyStruct"
+./make_prefix_test.sh "prefix_test_ldfld_unaligned" valid  "unaligned. 1 ldfld int32 MyStruct::foo " "ldloca 0" "MyStruct"
+
+
+./make_prefix_test.sh "prefix_test_stfld_volatile" valid "volatile. stfld int32 MyStruct::foo" "ldloca 0\n\tldc.i4.0" "MyStruct"
+./make_prefix_test.sh "prefix_test_stfld_unaligned" valid  "unaligned. 1 stfld int32 MyStruct::foo" "ldloca 0\n\tldc.i4.0" "MyStruct"
+
+./make_prefix_test.sh "prefix_test_ldobj_volatile" valid "volatile. ldobj MyStruct" "ldloca 0" "MyStruct"
+./make_prefix_test.sh "prefix_test_ldobj_unaligned" valid  "unaligned. 1 ldobj MyStruct" "ldloca 0" "MyStruct"
+
+./make_prefix_test.sh "prefix_test_stobj_volatile" valid "volatile. stobj MyStruct" "ldloca 0\n\tldloc.0" "MyStruct"
+./make_prefix_test.sh "prefix_test_stobj_unaligned" valid  "unaligned. 1 stobj MyStruct" "ldloca 0\n\tldloc.0" "MyStruct"
+
+./make_prefix_test.sh "prefix_test_cpblk_volatile" unverifiable "volatile. cpblk" "ldloca 0\n\tldloca 0\n\tldc.i4.1" "MyStruct"
+./make_prefix_test.sh "prefix_test_cpblk_unaligned" unverifiable  "unaligned. 1 cpblk" "ldloca 0\n\tldloca 0\n\tldc.i4.1" "MyStruct"
+
+./make_prefix_test.sh "prefix_test_initblk_volatile" unverifiable "volatile. initblk" "ldloca 0\n\tldc.i4.0\n\tldc.i4.1" "MyStruct"
+./make_prefix_test.sh "prefix_test_initblk_unaligned" unverifiable  "unaligned. 1 initblk" "ldloca 0\n\tldc.i4.0\n\tldc.i4.1" "MyStruct"
+
+./make_prefix_test.sh "prefix_test_stsfld_volatile" valid "volatile. stsfld int32 MyStruct::stFoo" "ldc.i4.0" "MyStruct"
+./make_prefix_test.sh "prefix_test_stsfld_unaligned" invalid  "unaligned. 1 stsfld int32 MyStruct::stFoo" "ldc.i4.0" "MyStruct"
+
+./make_prefix_test.sh "prefix_test_ldsfld_volatile" valid "volatile. ldsfld int32 MyStruct::stFoo" "" "MyStruct"
+./make_prefix_test.sh "prefix_test_ldsfld_unaligned" invalid  "unaligned. 1 ldsfld int32 MyStruct::stFoo" "" "MyStruct"
+
+
+I=1
+for TYPE in "nop" "new object::.ctor()" "call void MyStruct::Test()"
+do
+       ./make_prefix_test.sh "prefix_test_invalid_op_volatile_$I" invalid  "volatile. $OP" "nop" "int32"
+       ./make_prefix_test.sh "prefix_test_invalid_op_unaligned_$I" invalid  "unaligned. 1 nop" "nop" "int32"
+       I=`expr $I + 1`
+done
+
+
+
+#prefix tail.
+./make_tail_call_test.sh "prefix_test_tail_call" valid "call void MyStruct::Test()" "" "int32"
+./make_tail_call_test.sh "prefix_test_tail_callvirt" valid "callvirt instance void ClassA::VirtTest()" "newobj instance void ClassA::.ctor()" "int32"
+
+#MS runtime maks calli as been unverifiable even on a scenario that is verifiable by the spec.
+./make_tail_call_test.sh "prefix_test_tail_calli" unverifiable "calli void()" "ldftn void MyStruct::Test()" "int32"
+
+#not followed by a ret
+./make_tail_call_test.sh "prefix_test_tail_call_not_followed_by_ret" unverifiable "call void MyStruct::Test()\n\tnop" "" "int32"
+
+#caller return type is diferent
+./make_tail_call_test.sh "prefix_test_tail_call_different_return_type" invalid "call void MyStruct::Test()\n\tnop" "" "int32" "int32"
+
+
+./make_tail_call_test.sh "prefix_test_tail_call_compatible_return_type" valid "call string MyStruct::StrTest()" "" "string" "object"
+
+
+#callee receive byref
+./make_tail_call_test.sh "prefix_test_tail_call_callee_with_byref_arg" invalid "call void MyStruct::Test(int32\&)\n\tnop" "ldloca 0" "int32"
+
+
+./make_tail_call_test.sh "prefix_test_tail_call_middle_of_instruction" invalid "call void MyStruct::Test()" "newobj instance void object::.ctor()\n\tcallvirt instance int32 object::GetHashCode()\n\tbrtrue MIDDLE" "int32"
+
+./make_tail_call_test.sh "prefix_test_tail_with_invalid_instruction" invalid "nop" "" "int32"
+
+
+#ckfinite
+
+I=1
+for TYPE in float32 float64
+do
+       ./make_unary_test.sh ck_finite_test_$I valid "ckfinite" "$TYPE"
+       I=`expr $I + 1`
+done
+
+I=1
+for TYPE in int8 bool int32 int64 "int32&" object
+do
+       ./make_unary_test.sh ck_finite_test_bad_arg_$I invalid "ckfinite" "$TYPE"
+       I=`expr $I + 1`
+done
+
+./make_unary_test.sh ck_finite_tes_underflow invalid "pop\n\tckfinite" "$TYPE"
+
+
+#overlapped types
+./make_overlapped_test.sh not_overlapped_test valid 0 4 0
+
+./make_overlapped_test.sh obj_overlapped_with_long invalid 0 4 0 int64
+
+
+for I in 0 1 2 3
+do
+       ./make_overlapped_test.sh bad_overlapped_$I invalid 0 $I 0
+done
+
+for I in 1 2 3 5 6 7
+do
+       ./make_overlapped_test.sh bad_overlapped_end_$I invalid 0 $I 4
+done
+
+for I in 1 2 3 5 6 7
+do
+       ./make_overlapped_test.sh obj_bad_aligned_$I invalid 0 $I 0
+done
+
+#we must be carefull as on 64 bits machines a reference takes 8 bytes.
+for I in 13 14 15
+do
+       ./make_overlapped_test.sh int_bad_aligned_$I valid 0 4 $I
+done
+
+#Tests for aligned overllaping reference fields.
+./make_overlapped_test.sh ref_only_overlapping_1 typeunverifiable 0 0 8 object
+./make_overlapped_test.sh ref_only_overlapping_2 invalid 0 1 8 object
+./make_overlapped_test.sh ref_only_overlapping_3 invalid 0 2 8 object
+./make_overlapped_test.sh ref_only_overlapping_4 typeunverifiable 0 0 8 "int8[]"
+./make_overlapped_test.sh ref_only_overlapping_5 invalid 0 0 8 int32
+
+#invalid opcodes
+I=166; while [ $I -le 178 ]
+do
+       ./make_bad_op_test.sh bad_op_$I invalid $I
+       I=$((I + 1))
+done
+
+
+I=187; while [ $I -le 193 ]
+do
+       ./make_bad_op_test.sh bad_op_$I invalid $I
+       I=$((I + 1))
+done
+
+I=196; while [ $I -le 207 ]
+do
+       ./make_bad_op_test.sh bad_op_$I invalid $I
+       I=$((I + 1))
+done
+
+I=225; while [ $I -le 253 ]
+do
+       ./make_bad_op_test.sh bad_op_$I invalid $I
+       I=$((I + 1))
+done
+
+./make_bad_op_test.sh bad_op_xff invalid 255
+
+
+I=35; while [ $I -le 255 ]
+do
+       ./make_bad_op_test.sh bad_op_with_prefix_$I invalid 0xFE $I
+       I=$((I + 1))
+done
+
+
+
+
+#interaction between boxed generic arguments and its constraints
+./make_boxed_genarg_test.sh boxed_genarg_cnstr_obj valid "constrained. !0 callvirt instance int32 object::GetHashCode()" "ldloca 0"
+./make_boxed_genarg_test.sh boxed_genarg_cnstr_iface valid "constrained. !0 callvirt instance void class IFace::Tst()" "ldloca 0"
+
+./make_boxed_genarg_test.sh boxed_genarg_delegate valid "ldvirtftn instance void class IFace::Tst()\n\tnewobj instance void class TstDelegate::'.ctor'(object, native int)" "ldloc.0\n\tbox !T\n\tdup"
+
+./make_boxed_genarg_test.sh boxed_genarg_stfld_arg valid "stfld IFace class DriverClass<!0>::ifField" "ldarg.0\n\tldloc.0\n\tbox !T"
+
+./make_boxed_genarg_test.sh boxed_genarg_stfld_this_1 valid "stfld int32 class BaseClass::fld" "ldloc.0\n\tbox !T\n\tldc.i4.1" "BaseClass"
+
+./make_boxed_genarg_test.sh boxed_genarg_stfld_this_2 unverifiable "stfld int32 class BaseClass::fld" "ldloc.0\n\tldc.i4.1" "BaseClass"
+
+./make_boxed_genarg_test.sh boxed_genarg_ldfld_1 valid "ldfld int32 class BaseClass::fld" "ldloc.0\n\tbox !T" "BaseClass"
+
+./make_boxed_genarg_test.sh boxed_genarg_ldfld_2 unverifiable "ldfld int32 class BaseClass::fld" "ldloc.0" "BaseClass"
+
+
+./make_boxed_genarg_test.sh boxed_genarg_initobj_1 unverifiable "initobj IFace" "ldloca 0"
+./make_boxed_genarg_test.sh boxed_genarg_initobj_2 unverifiable "initobj !0" "ldloca 1"
+
+./make_boxed_genarg_test.sh boxed_genarg_stobj_1 unverifiable "stobj IFace" "ldloca 0\n\tldloc.0\n\tbox !T"
+./make_boxed_genarg_test.sh boxed_genarg_stobj_2 unverifiable "stobj !0" "ldloca 0\n\tldloc.0\n\tbox !T"
+./make_boxed_genarg_test.sh boxed_genarg_stobj_3 valid "stobj IFace" "ldloca 1\n\tldloc.0\n\tbox !T"
+./make_boxed_genarg_test.sh boxed_genarg_stobj_4 unverifiable "stobj !0" "ldloca 1\n\tldloc.0\n\tbox !T"
+./make_boxed_genarg_test.sh boxed_genarg_stobj_5 valid "stobj !0" "ldloca 0\n\tldloc.0"
+
+./make_stobj_test.sh stobj_boxing_test_1 valid "int32" "int32\&" "int32" ""
+./make_stobj_test.sh stobj_boxing_test_2 unverifiable "int32" "int32\&" "int32" "box int32"
+./make_stobj_test.sh stobj_boxing_test_3 valid "object" "object\&" "object" "box object"
+
+./make_boxed_genarg_test.sh boxed_genarg_stind_ref_1 unverifiable "stind.ref" "ldloca 0\n\tldloc.0"
+./make_boxed_genarg_test.sh boxed_genarg_stind_ref_2 unverifiable "stind.ref" "ldloca 0\n\tldloc.0\n\tbox !T"
+
+./make_boxed_genarg_test.sh boxed_genarg_stind_ref_3 unverifiable "stind.ref" "ldloca 1\n\tldloc.0"
+./make_boxed_genarg_test.sh boxed_genarg_stind_ref_4 valid "stind.ref" "ldloca 1\n\tldloc.0\n\tbox !T"
+
+./make_boxed_genarg_test.sh boxed_genarg_stelem_1 unverifiable "stelem IFace" "ldloc.2\n\tldc.i4.0\n\tldloc.0\n\tbox !T"
+./make_boxed_genarg_test.sh boxed_genarg_stelem_2 unverifiable "stelem !0" "ldloc.2\n\tldc.i4.0\n\tldloc.0\n\tbox !T"
+
+./make_boxed_genarg_test.sh boxed_genarg_stelem_3 unverifiable "stelem IFace" "ldloc.2\n\tldc.i4.0\n\tldloc.1"
+./make_boxed_genarg_test.sh boxed_genarg_stelem_4 unverifiable "stelem !0" "ldloc.2\n\tldc.i4.0\n\tldloc.1"
+
+./make_boxed_genarg_test.sh boxed_genarg_stelem_5 valid "stelem IFace" "ldloc.3\n\tldc.i4.0\n\tldloc.0\n\tbox !T"
+./make_boxed_genarg_test.sh boxed_genarg_stelem_6 unverifiable "stelem !0" "ldloc.3\n\tldc.i4.0\n\tldloc.0\n\tbox !T"
+
+./make_boxed_genarg_test.sh boxed_genarg_stelem_7 valid "stelem IFace" "ldloc.3\n\tldc.i4.0\n\tldloc.1"
+./make_boxed_genarg_test.sh boxed_genarg_stelem_8 unverifiable "stelem !0" "ldloc.3\n\tldc.i4.0\n\tldloc.1"
+
+./make_boxed_genarg_test.sh boxed_genarg_stelem_9 unverifiable "stelem IFace" "ldloc.2\n\tldc.i4.0\n\tldloc.0"
+./make_boxed_genarg_test.sh boxed_genarg_stelem_10 valid "stelem !0" "ldloc.2\n\tldc.i4.0\n\tldloc.0"
+
+./make_boxed_genarg_test.sh boxed_genarg_stelem_11 unverifiable "stelem IFace" "ldloc.3\n\tldc.i4.0\n\tldloc.0"
+./make_boxed_genarg_test.sh boxed_genarg_stelem_12 unverifiable "stelem !0" "ldloc.3\n\tldc.i4.0\n\tldloc.0"
+
+
+./make_boxed_genarg_test.sh boxed_genarg_stack_merge_1 valid "pop\n\tldloc.1" "ldloc.1\n\tnewobj instance void object::.ctor()\n\tcallvirt instance int32 object::GetHashCode()\n\tbrtrue TARGET"
+
+
+./make_boxed_genarg_test.sh boxed_genarg_stack_merge_2 unverifiable "pop\n\tldloc.1" "ldloc.0\n\tnewobj instance void object::.ctor()\n\tcallvirt instance int32 object::GetHashCode()\n\tbrtrue TARGET"
+
+./make_boxed_genarg_test.sh boxed_genarg_stack_merge_3 valid "pop\n\tldloc.1" "ldloc.0\n\tbox !T\n\tnewobj instance void object::.ctor()\n\tcallvirt instance int32 object::GetHashCode()\n\tbrtrue TARGET"
+
+./make_boxed_genarg_test.sh boxed_genarg_stack_merge_4 unverifiable "pop\n\tldloc.1" "ldloc.0\n\tbox IFace\n\tnewobj instance void object::.ctor()\n\tcallvirt instance int32 object::GetHashCode()\n\tbrtrue TARGET"
+
+
+./make_boxed_genarg_test.sh boxed_genarg_stack_merge_5 unverifiable "pop\n\tldloc.0" "ldloc.1\n\tnewobj instance void object::.ctor()\n\tcallvirt instance int32 object::GetHashCode()\n\tbrtrue TARGET"
+
+./make_boxed_genarg_test.sh boxed_genarg_stack_merge_6 valid "pop\n\tldloc.0\n\tbox !T" "ldloc.1\n\tnewobj instance void object::.ctor()\n\tcallvirt instance int32 object::GetHashCode()\n\tbrtrue TARGET"
+
+./make_boxed_genarg_test.sh boxed_genarg_stack_merge_7 unverifiable "pop\n\tldloc.0\n\tbox IFace" "ldloc.1\n\tnewobj instance void object::.ctor()\n\tcallvirt instance int32 object::GetHashCode()\n\tbrtrue TARGET"
+
+
+
+#test for IL overflow
+
+for I in 0x0E 0x0F 0x10 0x11 0x12 0x13 0x1F 0x2B 0x2C 0x2D 0x2E 0x2F 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0xDE 0xFE
+do
+       ./make_il_overflow_test.sh incomplete_op_${I} invalid $I
+done
+
+for I in 0x20 0x21 0x22 0x23 0x28 0x29 0x38 0x39 0x3A 0x3B 0x3C 0x3D 0x3E 0x3F 0x40 0x41 0x42 0x43 0x44 0x6F 0x70 0x71 0x72 0x73 0x74 0x75 0x79 0x7B 0x7C 0x7D 0x7E 0x7F 0x80 0x81 0x8D 0x8C 0x8F 0xA3 0xA4 0xA5 0xC2 0xC6 0xD0 0xDD
+do
+       ./make_il_overflow_test.sh incomplete_op_${I} invalid $I
+       ./make_il_overflow_test.sh incomplete_op_${I}_0x00 invalid $I 0x00
+       ./make_il_overflow_test.sh incomplete_op_${I}_0x00_0x00 invalid $I 0x00 0x00
+       ./make_il_overflow_test.sh incomplete_op_${I}_0x00_0x00_0x00 invalid $I 0x00 0x00
+done
+
+
+for I in 0x06 0x07 0x09 0x0A 0x0E 0x0B 0x0C 0x0D 0x12 0x15 0x16 0x19 0x1C
+do
+       ./make_il_overflow_test.sh incomplete_op_0xFE_${I} invalid 0xFE $I
+       ./make_il_overflow_test.sh incomplete_op_0xFE_${I}_0x00 invalid 0xFE $I 0x00
+done
+
+#switch
+./make_il_overflow_test.sh incomplete_switch_1 invalid 0x45
+./make_il_overflow_test.sh incomplete_switch_2 invalid 0x45 0x00
+./make_il_overflow_test.sh incomplete_switch_3 invalid 0x45 0x00 0x00
+./make_il_overflow_test.sh incomplete_switch_4 invalid 0x45 0x00 0x00
+
+./make_il_overflow_test.sh incomplete_switch_arg_1 invalid 0x45 0x00 0x00 0x00 0x01
+./make_il_overflow_test.sh incomplete_switch_arg_2 invalid 0x45 0x00 0x00 0x00 0x01 0x00
+
+
+
+#tests for visibility of instantiated generic types and methods
+./make_type_visibility_test.sh type_vis_gist_1 valid "newobj instance void class Foo<[test_lib]ClassC>::.ctor()"
+./make_type_visibility_test.sh type_vis_gist_2 unverifiable "newobj instance void class Foo<[test_lib]NotExportedA>::.ctor()"
+
+
+./make_type_visibility_test.sh type_vis_cast_1 valid "castclass class [test_lib]ClassC"
+./make_type_visibility_test.sh type_vis_cast_2 valid "castclass class [test_lib]NotExportedA"
+./make_type_visibility_test.sh type_vis_cast_gist_1 valid "castclass class Foo<[test_lib]ClassC>"
+./make_type_visibility_test.sh type_vis_cast_gist_2 valid "castclass class Foo<[test_lib]NotExportedA>"
+
+
+./make_type_visibility_test.sh type_vis_sizeof_1 valid "sizeof class [test_lib]ClassC"
+./make_type_visibility_test.sh type_vis_sizeof_2 valid "sizeof class [test_lib]NotExportedA"
+./make_type_visibility_test.sh type_vis_sizeof_gist_1 valid "sizeof class Foo<[test_lib]ClassC>"
+./make_type_visibility_test.sh type_vis_sizeof_gist_2 valid "sizeof class Foo<[test_lib]NotExportedA>"
+
+
+./make_type_visibility_test.sh type_vis_newarr_1 valid "newarr class [test_lib]ClassC" "ldc.i4.1"
+./make_type_visibility_test.sh type_vis_newarr_2 valid "newarr class [test_lib]NotExportedA" "ldc.i4.1"
+./make_type_visibility_test.sh type_vis_newarr_gist_1 valid "newarr class Foo<[test_lib]ClassC>" "ldc.i4.1"
+./make_type_visibility_test.sh type_vis_newarr_gist_2 valid "newarr class Foo<[test_lib]NotExportedA>" "ldc.i4.1"
+
+
+./make_type_visibility_test.sh type_vis_ldelem_1 valid "ldelem class [test_lib]ClassC" "ldc.i4.1\n\tnewarr class [test_lib]ClassC\n\tldc.i4.0"
+./make_type_visibility_test.sh type_vis_ldelem_2 valid "ldelem class [test_lib]NotExportedA" "ldc.i4.1\n\tnewarr class [test_lib]NotExportedA\n\tldc.i4.0"
+./make_type_visibility_test.sh type_vis_ldelem_gist_1 valid "ldelem class Foo<[test_lib]ClassC>" "ldc.i4.1\n\tnewarr class Foo<[test_lib]ClassC>\n\tldc.i4.0"
+./make_type_visibility_test.sh type_vis_ldelem_gist_2 valid "ldelem class Foo<[test_lib]NotExportedA>" "ldc.i4.1\n\tnewarr class Foo<[test_lib]NotExportedA>\n\tldc.i4.0"
+
+
+./make_type_visibility_test.sh type_vis_stelem_1 valid "stelem class [test_lib]ClassC" "ldc.i4.1\n\tnewarr class [test_lib]ClassC\n\tldc.i4.0\n\tldnull"
+./make_type_visibility_test.sh type_vis_stelem_2 valid "stelem class [test_lib]NotExportedA" "ldc.i4.1\n\tnewarr class [test_lib]NotExportedA\n\tldc.i4.0\n\tldnull"
+./make_type_visibility_test.sh type_vis_stelem_gist_1 valid "stelem class Foo<[test_lib]ClassC>" "ldc.i4.1\n\tnewarr class Foo<[test_lib]ClassC>\n\tldc.i4.0\n\tldnull"
+./make_type_visibility_test.sh type_vis_stelem_gist_2 valid "stelem class Foo<[test_lib]NotExportedA>" "ldc.i4.1\n\tnewarr class Foo<[test_lib]NotExportedA>\n\tldc.i4.0\n\tldnull"
+
+
+./make_type_visibility_test.sh type_vis_box_1 valid "box valuetype [test_lib]PublicStruct" "ldloc.1" "valuetype [test_lib]PublicStruct"
+./make_type_visibility_test.sh type_vis_box_2 valid "box valuetype [test_lib]NBStruct" "ldloc.1" "valuetype [test_lib]NBStruct"
+
+
+#generic method
+
+./make_type_visibility_test.sh type_vis_gmethod_1 valid "call void SimpleClass::Generic<[test_lib]ClassC>()"
+./make_type_visibility_test.sh type_vis_gmethod_2 unverifiable "call void SimpleClass::Generic<[test_lib]NotExportedA>()"
+
+
+#Constructor tests
+
+./make_ctor_test.sh ctor_good_ops_1 valid "call instance void object::'.ctor'()"
+./make_ctor_test.sh ctor_good_ops_2 valid "nop\n\tcall instance void object::'.ctor'()"
+./make_ctor_test.sh ctor_good_ops_3 valid "dup\n\tldc.i4.0\n\tstfld int32 Test::val\n\tcall instance void object::'.ctor'()"
+./make_ctor_test.sh ctor_good_ops_4 valid "dup\n\tldfld int32 Test::val\n\tpop\n\tcall instance void object::'.ctor'()"
+./make_ctor_test.sh ctor_good_ops_5 valid "dup\n\tpop\n\tcall instance void object::'.ctor'()"
+
+./make_ctor_test.sh ctor_call_super_2x valid "call instance void object::'.ctor'()\n\tldarg.0\n\tcall instance void object::'.ctor'()"
+
+./make_ctor_test.sh ctor_pass_this_as_arg_1 unverifiable "ldarg.0\n\tcall instance void TestClass::'.ctor'(object)" "other"
+./make_ctor_test.sh ctor_pass_this_as_arg_2 unverifiable "dup\n\tcall instance void TestClass::'.ctor'(object)" "other"
+
+
+./make_ctor_test.sh ctor_no_super_call unverifiable "nop"
+./make_ctor_test.sh ctor_call_invalid_super unverifiable "call instance void TestClass::'.ctor'()"
+./make_call_test.sh ctor_call_outside_ctor unverifiable "call instance void ClassA::.ctor()" "newobj instance void ClassA::.ctor()"
+
+./make_ctor_test.sh ctor_use_non_this_ptr unverifiable "ldloc.0\n\tcall instance void object::'.ctor'()"
+./make_ctor_test.sh ctor_store_this_on_field unverifiable "dup\n\tdup\n\tstfld object Test::obj\n\tcall instance void object::'.ctor'()"
+
+
+./make_ctor_test.sh ctor_use_uninit_this_1 unverifiable "dup\n\tcall void Test::StaticMethod(object)\n\tcall instance void object::'.ctor'()"
+./make_ctor_test.sh ctor_use_uninit_this_2 unverifiable "dup\n\tcall instance void Test::InstanceMethod()\n\tcall instance void object::'.ctor'()"
+./make_ctor_test.sh ctor_use_uninit_this_3 unverifiable "dup\n\tcastclass [mscorlib]System.String\n\tcall instance void object::'.ctor'()"
+./make_ctor_test.sh ctor_use_uninit_this_4 unverifiable "dup\n\tunbox.any Test\n\tcall instance void object::'.ctor'()"
+./make_ctor_test.sh ctor_use_uninit_this_5 unverifiable "dup\n\tcall instance void object::'.ctor'()\n\tcall instance void Test::InstanceMethod()"
+
+./make_ctor_test.sh ctor_bad_ops_1 unverifiable "dup\n\tstloc.0\n\tcall instance void object::'.ctor'()"
+./make_ctor_test.sh ctor_bad_ops_2 unverifiable "dup\n\tcall instance void object::'.ctor'()\n\tcall instance void Test::InstanceMethod()"
+
+#TODO try / catch inside constructor
+
+
+#TODO methods cannot have variance, but this should be checked at load time
+#TODO check for variance compatibility between types
+
+#generic delegate validation
+
+./make_generic_argument_constraints_test.sh no_constraints valid "" ""
+
+I=1
+for SRC in "(IfaceA)" "(IfaceB)" "(IfaceA, IfaceB)" ".ctor" "class" 
+do
+       ./make_generic_argument_constraints_test.sh src_ctrs_only_${I} unverifiable "$SRC" ""
+       I=`expr $I + 1`
+done
+
+./make_generic_argument_constraints_test.sh src_ctrs_only_vt unverifiable "valuetype" "" "int32"
+
+
+#Type arg compatibility
+./make_generic_argument_constraints_test.sh type_ctrs_1 valid "(IfaceA)" "(IfaceA)"
+./make_generic_argument_constraints_test.sh type_ctrs_2 valid "(IfaceA)" "(IfaceB, IfaceA)"
+./make_generic_argument_constraints_test.sh type_ctrs_3 unverifiable "(IfaceA)" "(IfaceB)"
+./make_generic_argument_constraints_test.sh type_ctrs_4 unverifiable "(IfaceA, IfaceB)" "(IfaceA)"
+
+#DefaultArgument implements IfaceA
+./make_generic_argument_constraints_test.sh type_ctrs_5 valid "(IfaceA)" "(DefaultArgument)"
+
+
+./make_generic_argument_constraints_test.sh type_ctor_1 valid ".ctor" ".ctor"
+
+./make_generic_argument_constraints_test.sh type_class_1 valid "class" "class"
+
+./make_generic_argument_constraints_test.sh type_valuetype_1 valid "valuetype" "valuetype" "int32"
 
+./make_generic_argument_constraints_test.sh type_mixed_1 valid "class (IfaceA)" "class (IfaceA)"
+./make_generic_argument_constraints_test.sh type_mixed_2 valid "(IfaceA)" "class (IfaceA)"
 
+./make_generic_argument_constraints_test.sh type_mixed_3 valid "" "(IfaceA)"
+./make_generic_argument_constraints_test.sh type_mixed_4 valid "" "class (IfaceA)"