Merge pull request #2034 from alexrp/ctx-cleanup
[mono.git] / mono / mini / iltests.il
1 .assembly iltests {
2   .custom instance void class [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::'.ctor'() =  (
3                 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78   // ....T..WrapNonEx
4                 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01       ) // ceptionThrows.
5 }
6 .assembly extern TestDriver {}
7 .assembly extern mscorlib {}
8
9 .class public auto ansi sealed beforefieldinit Tests {
10
11         .method static public int32 Main(string[] args) il managed {
12                 .entrypoint
13                 
14                 ldtoken Tests
15                 call       class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
16                 ldarg.0
17                 call       int32 [TestDriver]TestDriver::RunTests(class [mscorlib]System.Type, string[])
18                 ret
19         }
20
21         // make sure the register allocator works when the return value of
22         // 'div' is discarded
23         .method static public int32 test_0_div_regalloc () il managed {
24                 .locals init (
25                         int32 i
26                 )
27
28                 ldloc 0
29                 ldc.i4.s 0xa
30                 div
31                 pop
32                 ldc.i4.0
33                 ret
34         }
35         
36         
37         .method static public int32 test_1_ceq_to_i4 () il managed {
38                 .locals init (
39                         int32   foo
40                 )
41                 ldc.i4 500
42                 stloc foo
43                 ldloc foo
44                 ldc.i4 500
45                 ceq
46                 stloc foo
47                 ldloc foo
48                 ret
49         }
50         
51         .method static public int32 test_3_shl_regvars () il managed {
52                 .locals init (
53                         int32   a,
54                         int32   b,
55                         int32   r1,
56                         int32   r2,
57                         int32   r3
58                 )
59                         
60                 ldc.i4.2
61                 stloc      a
62                 ldc.i4.1
63                 stloc      b
64         
65                 ldloc      a
66                 ldloc      b
67                 shl 
68                 stloc      r1
69                 
70                 ldloc      a
71                 ldloc      b
72                 shl 
73                 stloc      r2
74                 
75                 ldloc      a
76                 ldloc      b
77                 shl 
78                 stloc      r3
79                 
80                 ldloc      r1
81                 ldc.i4.4
82                 ceq
83                 
84                 ldloc      r2
85                 ldc.i4.4
86                 ceq
87                 
88                 ldloc      r3
89                 ldc.i4.4
90                 ceq
91                 
92                 add
93                 add
94                 
95                 ret
96         }
97         
98         .method static public int32 test_1_fceq_to_i4 () il managed {
99         
100                 .locals init (
101                         float64 foo,
102                         int32   val
103                 )
104
105                 ldc.r8      2
106                 stloc       foo
107                 
108                 ldloc       foo
109                 ldc.r8      2
110                 ceq
111                 stloc       val
112                 
113                 ldloc       val
114                 ret
115         }
116
117         //
118         // This should be manually checked. Basically under -O=linears,
119         // you should not see tons of register spilling.
120         //
121         .method static public int32 test_1_bytedreg_free () il managed {
122                 .locals init (
123                         int32   foo
124                 )
125                 ldc.i4 500
126                 stloc foo
127                 ldloc foo
128                 ldc.i4 500
129                 ceq
130                 stloc foo
131                 
132                 ldloc foo
133                 ldc.i4 1
134                 ceq
135                 stloc foo
136
137                 ldloc foo
138                 ldc.i4 1
139                 ceq
140                 stloc foo
141
142                 ldloc foo
143                 ldc.i4 1
144                 ceq
145                 stloc foo
146                 
147                 ldloc foo
148                 ldc.i4 1
149                 ceq
150                 stloc foo
151                 
152                 ldloc foo
153                 ret
154         }
155         
156         //
157         // This should be manually checked. Basically under -O=linears,
158         // you should not see tons of register spilling.
159         //
160         .method static public int32 test_0_bytesreg1_free () il managed {
161                 .locals init (
162                         unsigned int8      dest,
163                         int32              src,
164                         unsigned int8&     pdest
165                 )
166
167                 ldloca     dest
168                 stloc      pdest
169                 
170                 ldloc      pdest
171                 ldloc      src
172                 stind.i1
173                 
174                 ldloc      pdest
175                 ldloc      src
176                 stind.i1
177                 
178                 ldloc      pdest
179                 ldloc      src
180                 stind.i1
181                 
182                 ldloc      pdest
183                 ldloc      src
184                 stind.i1
185                 
186                 ldloc      pdest
187                 ldloc      src
188                 stind.i1
189                 
190                 ldloc      pdest
191                 ldloc      src
192                 stind.i1
193                 
194                 ldloc      pdest
195                 ldind.i1
196                 ret
197         }
198         
199         .method static public int32 test_1_shift_regvar () il managed {
200         
201                 .locals init (
202                         int32   v7FFFFFFF,
203                         int32   v1
204                 )
205                 
206                 ldc.i4  0x7FFFFFFF
207                 stloc   v7FFFFFFF
208         
209                 ldc.i4.1
210                 stloc v1
211                 
212                 ldloc   v7FFFFFFF
213                 ldloc   v1
214                 shl
215                 ldc.i4  0xFFFFFFFE
216                 ceq
217                 ret
218         }
219         
220         // this only happens with the managed pointer, not an unmanaged one.
221         .method static public int32 test_0_foo () il managed {
222         
223                 .locals init (
224                         int32&  buf
225                 )
226                 
227                 ldc.i4.5
228                 localloc
229                 
230                 stloc buf
231                 ldloc buf
232                 
233                 ldind.i4
234                 
235                 ret
236         }
237
238         .method static public int32 test_0_localloc () cil managed {
239                 .locals init (native int, native int, native int, native int, int32)
240
241                 ldc.i4 6
242                 localloc
243                 conv.i
244                 stloc.0
245
246                 ldc.i4 6
247                 localloc
248                 conv.i
249                 stloc.1
250
251                 ldc.i4 6
252                 localloc
253                 conv.i
254                 stloc.2
255
256                 // Variable length
257                 ldc.i4 128
258                 stloc.s 4
259                 ldloc.s 4
260                 localloc
261                 conv.i
262                 stloc.3
263
264                 // Check zero initialized
265                 ldloc.0
266                 ldind.i4
267                 ldc.i4.0
268                 beq OK1
269                 ldc.i4.1
270                 br FAIL
271
272 OK1:
273                 ldloc.3
274                 ldind.i4
275                 ldc.i4.0
276                 beq OK2
277                 ldc.i4.2
278                 br FAIL
279
280 OK2:
281                 ldloc.3
282                 ldc.i4.s 124
283                 add
284                 ldind.i4
285                 ldc.i4.0
286                 beq OK3
287                 ldc.i4.3
288                 br FAIL
289
290 OK3:
291                 ldloc.1
292                 ldc.i4 999999
293                 stind.i4
294                 ldloc.1
295                 ldind.i4
296                 ldc.i4 999999
297                 beq OK4
298                 ldc.i4.4
299                 br FAIL
300
301 OK4:
302                 ldloc.0
303                 ldc.i4 999999
304                 stind.i4
305                 ldloc.0
306                 ldind.i4
307                 ldc.i4 999999
308                 beq OK5
309                 ldc.i4.5
310                 br FAIL
311
312 OK5:
313                 // Try allocations bigger than one page
314                 ldc.i4 8196
315                 localloc
316                 conv.i
317                 stloc.3
318                 ldloc.3
319                 ldc.i4 8192
320                 add
321                 ldc.i4 99
322                 stind.i4
323                 ldloc.3
324                 ldc.i4 8192
325                 add
326                 ldind.i4
327                 ldc.i4 99
328                 beq PASS
329                 ldc.i4.6
330                 br FAIL
331
332 FAIL:
333                 ret
334
335 PASS:   ldc.i4.0
336                 ret
337         }
338
339     .method private static void do_localloc () cil managed {
340         .maxstack 3
341         .locals init (
342                 unsigned int8*  V_0)
343         IL_0000:  ldc.i4.1
344         IL_0001:  ldc.i4 131072
345         IL_0006:  mul
346         IL_0007:  localloc
347         IL_0009:  stloc.0
348         IL_000a:  ret
349     }
350
351         // Check that localloc cannot be inlined
352         .method static public int32 test_0_localloc_inline () cil managed {
353                 .maxstack 16
354                 .locals init (
355                         int32 i
356                 )
357
358                 ldc.i4.0
359         stloc.0
360         br COND
361
362 START:  call void class Tests::do_localloc()
363         ldloc.0
364         ldc.i4.1
365         add
366         stloc.0
367 COND:   ldloc.0
368         ldc.i4 1000
369         blt START
370
371                 ldc.i4.0
372                 ret
373         }       
374         
375         .method static public int32 test_3_copy_used_bug () il managed {
376
377                 .locals init (
378                         int32 size,
379                         int32 res
380                 )
381
382                 ldc.i4 0
383                 stloc res
384
385                 ldc.i4 1
386                 stloc size
387
388                 ldloc size
389                 ldloc size
390                 ldloc size
391                 add
392                 stloc size
393                 ldloc size
394                 add
395                 stloc res
396
397                 ldloc res
398                 ret
399         }
400
401         // demonstrate that the copy_used_var is not a fix for the above bug
402         .method static public int32 test_3_copy_used_indir_bug () il managed {
403
404                 .locals init (
405                         int32 size,
406                         int32 res
407                 )
408
409                 ldc.i4 0
410                 stloc res
411
412                 ldc.i4 1
413                 stloc size
414
415                 ldloc size
416                 ldloca size
417                 ldloc size
418                 ldloc size
419                 add
420                 stind.i4
421                 ldloc size
422                 add
423                 stloc res
424
425                 ldloc res
426                 ret
427         }
428
429         .method static public void do_nothing (int32 a) il managed {
430                 ret
431         }
432         
433         // demonstrate the block_split failure: needs -O=inline
434         // mini -O=inline --compile Tests:test_0_split_block_bug iltests.exe
435         .method static public int32 test_0_split_block_bug () il managed {
436
437                 .locals init (
438                         int32 i1
439                 )
440
441                 ldc.i4 1
442                 stloc i1
443  test_label:
444                 ldloc i1
445                 call void class Tests::do_nothing (int32)
446                 ldc.i4 0
447                 brtrue test_label
448                 
449                 ldc.i4 0
450                 ret
451         }
452
453         .method public void inline_do_nothing () il managed {
454                 ret
455         }
456         .method static public int32 test_1_checkthis_inlining () il managed {
457                 ldnull
458                 call instance void class Tests::inline_do_nothing ()
459                 ldc.i4 1
460                 ret
461         }
462
463         .class nested private auto ansi sealed beforefieldinit TailCallStruct 
464                 extends [mscorlib]System.ValueType {
465                 .field public int32 a
466                 .field public int32 b
467         }
468
469         .method static valuetype Tests/TailCallStruct tail1 (valuetype Tests/TailCallStruct arg) {
470                 ldarga 0
471                 ldarga 0
472                 ldfld int32 Tests/TailCallStruct::a
473                 ldc.i4.1
474                 add
475                 stfld int32 Tests/TailCallStruct::a
476                 ldarga 0
477                 ldarga 0
478                 ldfld int32 Tests/TailCallStruct::a
479                 ldc.i4.2
480                 add
481                 stfld int32 Tests/TailCallStruct::a
482                 ldarg.0
483                 ret
484         }
485
486         .method static valuetype Tests/TailCallStruct tail2 (valuetype Tests/TailCallStruct arg) {
487                 ldarg.0
488                 tail.
489                 call valuetype Tests/TailCallStruct Tests::tail1 (valuetype Tests/TailCallStruct)
490                 ret
491         }
492
493         .class nested private auto ansi sealed beforefieldinit TailCallStructBig
494                 extends [mscorlib]System.ValueType {
495                 .field public int32 a
496                 .field public int32 b
497                 .field public int32 c
498                 .field public int32 d
499                 .field public int32 e
500         }
501
502         .method static valuetype Tests/TailCallStructBig tail_vret_by_addr_inner (valuetype Tests/TailCallStructBig arg) {
503                 ldarga 0
504                 ldarga 0
505                 ldfld int32 Tests/TailCallStructBig::a
506                 ldc.i4.1
507                 add
508                 stfld int32 Tests/TailCallStructBig::a
509                 ldarg.0
510                 ret
511         }
512
513         .method static valuetype Tests/TailCallStructBig tail_vret_by_addr (valuetype Tests/TailCallStructBig arg) {
514                 ldarg.0
515                 tail.
516                 call valuetype Tests/TailCallStructBig Tests::tail_vret_by_addr_inner (valuetype Tests/TailCallStructBig)
517                 ret
518         }
519
520         .method static public int32 test_3_tail_call_vret_by_addr () il managed {
521                 .maxstack 16
522                 .locals init (
523                         valuetype Tests/TailCallStructBig arg2
524                 )
525
526                 ldloca 0
527                 ldc.i4.2
528                 stfld int32 Tests/TailCallStructBig::a
529                 ldloc.0
530                 call valuetype Tests/TailCallStructBig Tests::tail_vret_by_addr (valuetype Tests/TailCallStructBig)
531                 stloc.0
532
533                 ldloca 0
534                 ldfld int32 Tests/TailCallStructBig::a
535                 ret
536         }
537
538         .method static public int32 test_9_tail_call_vret_by_val () il managed {
539                 .maxstack 16
540                 .locals init (
541                         valuetype Tests/TailCallStruct arg
542                 )
543                 ldloca 0
544                 ldc.i4.2
545                 stfld int32 Tests/TailCallStruct::a
546                 ldloca 0
547                 ldc.i4.4
548                 stfld int32 Tests/TailCallStruct::b
549                 ldloc.0
550                 call valuetype Tests/TailCallStruct Tests::tail2 (valuetype Tests/TailCallStruct)
551                 stloc.0
552
553                 ldloca 0
554                 ldfld int32 Tests/TailCallStruct::a
555                 ldloca 0
556                 ldfld int32 Tests/TailCallStruct::b
557                 add
558                 ret
559         }
560
561         .method static public int32 tail3 (int32 i, int32 j) il managed {
562                 ldarg.0
563                 ldarg.1
564                 add
565                 ret
566         }
567
568         .method static public int32 tail4 (int32 i, int32 j) il managed {
569                 .maxstack 16
570                 .locals init (
571                         int32 k)
572
573                 // Test arg0 allocated to a register
574                 ldarg.0
575                 ldarg.0
576                 ldarg.0
577                 ldarg.0
578                 add
579                 add
580                 add
581                 starg 0
582
583                 // Test switched up argument variables as the actual arguments
584                 ldarg.1
585                 ldarg.0
586                 tail.
587                 call int32 Tests::tail3 (int32, int32)
588                 ret
589         }
590
591         .method static public int32 test_24_tail_calls2 () il managed {
592                 // Some platforms might not be able to AOT tail calls
593                 .custom instance void class [TestDriver]CategoryAttribute::'.ctor'(string) =  (01 00 08 21 46 55 4C 4C 41 4F 54 00 00 ) // ...!FULLAOT..
594
595                 .maxstack 16
596                 .locals init (
597                         int32 i,
598                         int32 j)
599
600                 ldc.i4.4
601                 stloc.0
602                 ldc.i4.8
603                 stloc.1
604
605                 ldloc.0 
606                 ldloc.1
607                 call int32 Tests::tail4 (int32, int32)
608                 ret
609         }
610
611         .method public static int32 test_5_jmp () cil managed {
612                 // Some platforms might not be able to AOT tail calls
613                 .custom instance void class [TestDriver]CategoryAttribute::'.ctor'(string) =  (01 00 08 21 46 55 4C 4C 41 4F 54 00 00 ) // ...!FULLAOT..
614
615                 ldc.i4.1
616                 ldc.i4.2
617                 call int32 Tests::jmp2 (int32, int32)
618                 ret
619         }
620
621         .method public static int32 jmp2 (int32, int32) cil managed {
622                 ldarg.0
623                 ldc.i4.1
624                 add
625                 starg.s 0
626                 ldarg.1
627                 ldc.i4.1
628                 add
629                 starg.s 1
630                 jmp int32 Tests::jmp3 (int32, int32)
631                 ldc.i4.0
632                 ret
633         }               
634
635         .method public static int32 jmp3 (int32 i, int32 j) cil managed {
636                 ldarg.0
637                 ldarg.1
638                 add
639                 ret
640         }
641
642         .method static public int32 test_11_switch_with_nonempty_stack () il managed {
643                 .maxstack 16
644
645                 ldc.i4.5
646                 ldc.i4.6
647                 ldc.i4.1
648                 switch (L0, L1)
649         L0: 
650                 add
651                 ret
652         L1:
653                 add
654                 ret
655         }
656  
657     .method public static int32 test_5_endfinally_with_nonempty_stack () il managed {
658                 .maxstack 16
659
660         .try {
661           leave IL_0
662         }
663         finally  {
664           ldc.i4.0
665           endfinally
666         }
667         IL_0:  ldc.i4.5
668                 ret
669     }
670
671         .method public static int32 test_0_conv_ovf_i8_neg () il managed {
672                 .maxstack 16
673
674                 ldc.i4.m1
675                 conv.ovf.i8
676                 conv.i4
677                 ldc.i4.m1
678                 beq L_OK
679                 ldc.i4.1
680                 ret
681         L_OK:
682                 ldc.i4.0
683                 ret
684         }               
685
686         .method public static int32 test_1234_conv_u4 () cil managed {
687                 .maxstack 16
688
689                 ldc.i4 1234
690                 conv.u4
691                 conv.i4
692                 ret
693         }
694
695         .method public static int32 test_0_conv_ovf_i_un () cil managed {
696                 .maxstack 16
697
698                 ldc.i4 1234
699                 conv.ovf.i.un
700                 conv.i4
701                 ldc.i4 1234
702                 beq L1
703                 ldc.i4.1
704                 ret
705         L1:
706                 ldc.i4 0x7fffffff
707                 conv.ovf.i.un
708                 conv.i4
709                 ldc.i4 0x7fffffff
710                 beq L2
711                 ldc.i4.2
712                 ret
713         L2:
714                 sizeof [mscorlib]System.IntPtr
715                 ldc.i4 8
716                 beq L5
717                 .try {
718                         ldc.i4 0x80000000
719                         conv.ovf.i.un
720                         leave L4
721                 } catch [mscorlib]System.OverflowException {
722                         pop
723                         leave L5
724                 }
725         L4: 
726                 ldc.i4.3
727                 ret
728         L5:
729                 ldc.i4.0
730                 ret
731         }
732
733         .method public static int32 test_0_conv_ovf_u_un () cil managed {
734                 .maxstack 16
735
736                 ldc.i4 1234
737                 conv.ovf.u.un
738                 conv.i4
739                 ldc.i4 1234
740                 beq L1
741                 ldc.i4.1
742                 ret
743         L1:
744                 ldc.i4.0
745                 ret
746         }
747
748         .method public static int32 test_0_conv_ovf_i () cil managed {
749                 .maxstack 16
750
751                 ldc.i4 1234
752                 conv.ovf.i
753                 conv.i4
754                 ldc.i4 1234
755                 beq L1
756                 ldc.i4.1
757                 ret
758         L1:
759                 ldc.i4.0
760                 ret
761         }
762
763         .method public static int32 test_0_conv_ovf_u () cil managed {
764                 .maxstack 16
765
766                 ldc.i4 1234
767                 conv.ovf.u
768                 conv.i4
769                 ldc.i4 1234
770                 beq L1
771                 ldc.i4.1
772                 ret
773         L1:
774                 ldc.i4.0
775                 ret
776         }
777
778         .method public static int32 test_1234_conv_ovf_i8_un () cil managed {
779                 .maxstack 16
780
781                 ldc.i4 1234
782                 conv.ovf.i8.un
783                 conv.i4
784                 ret
785         }
786
787         .method public static int32 test_0_lconv_ovf_i () cil managed {
788                 .maxstack 16
789
790                 ldc.i4 1234
791                 conv.i8
792                 conv.ovf.i
793                 conv.i4
794                 ldc.i4 1234
795                 beq L1
796                 ldc.i4.1
797                 ret
798         L1:
799                 ldc.i4.0
800                 ret
801         }
802
803         .method public static int32 test_0_lconv_ovf_u () cil managed {
804                 .maxstack 16
805
806                 ldc.i4 1234
807                 conv.i8
808                 conv.ovf.u
809                 conv.i4
810                 ldc.i4 1234
811                 beq L1
812                 ldc.i4.1
813                 ret
814         L1:
815                 ldc.i4.0
816                 ret
817         }
818
819         .method public static int32 test_0_lconv_ovf_i_un () cil managed {
820                 .maxstack 16
821
822                 ldc.i4 1234
823                 conv.i8
824                 conv.ovf.i.un
825                 conv.i4
826                 ldc.i4 1234
827                 beq L1
828                 ldc.i4.1
829                 ret
830         L1:
831                 ldc.i4.0
832                 ret
833         }
834
835         .method public static int32 test_0_lconv_ovf_u_un () cil managed {
836                 .maxstack 16
837
838                 ldc.i4 1234
839                 conv.i8
840                 conv.ovf.u.un
841                 conv.i4
842                 ldc.i4 1234
843                 beq L1
844                 ldc.i4.1
845                 ret
846         L1:
847                 ldc.i4.0
848                 ret
849         }
850
851         .method public static int32 test_0_lconv_to_ovf_i8 () cil managed {
852                 .maxstack 16
853
854                 ldc.i4 1234
855                 conv.i8
856                 conv.ovf.i8
857                 conv.i4
858                 ldc.i4 1234
859                 beq L1
860                 ldc.i4.1
861                 ret
862         L1:
863                 ldc.i4.0
864                 ret
865         }
866
867         .method public static int32 test_0_lconv_to_ovf_u8_un () cil managed {
868                 .maxstack 16
869
870                 ldc.i4 1234
871                 conv.i8
872                 conv.ovf.u8.un
873                 conv.i4
874                 ldc.i4 1234
875                 beq L1
876                 ldc.i4.1
877                 ret
878         L1:
879                 ldc.i4.0
880                 ret
881         }
882
883         .method public static int32 test_2_lconv_to_ovf_i4_un () cil managed {
884                 .maxstack 16
885                 .locals init (int32 res)
886
887                 ldc.i4 0x7fffffff
888                 conv.u8
889                 conv.ovf.i4.un
890                 pop
891
892                 ldc.i4.2
893                 stloc res
894
895         .try {
896                         ldc.i8 0x80000000
897                         conv.ovf.i4.un
898                         pop
899                         ldc.i4.0
900                         stloc res
901                         leave RET
902                 } catch [mscorlib]System.OverflowException {
903                         pop
904                         leave IL_0
905                 }
906
907         IL_0:
908
909         .try {
910                         ldc.i8 0xffffffff80000000
911                         conv.ovf.i4.un
912                         pop
913                         ldc.i4.1
914                         stloc res
915                         leave RET
916                 } catch [mscorlib]System.OverflowException {
917                         pop
918                         leave RET
919                 }
920
921         RET:
922                 ldloc res
923                 ret
924         }
925
926     .method public static int32 test_1_lconv_to_ovf_i_un () cil managed {
927                 .maxstack 16
928                 .locals init (int32 res)
929
930                 ldc.i4 0x7fffffff
931                 conv.u8
932                 conv.ovf.i.un
933                 conv.i4
934                 pop
935
936                 ldc.i4.1
937                 ret
938         }
939
940         .method public static int32 test_32_lconv_to_u8 () cil managed
941         {
942                 .maxstack 16
943
944                 ldc.i4 32
945                 conv.i8
946                 conv.u8
947                 conv.i4
948                 ret
949         }                               
950
951         .method public static int32 test_32_lconv_to_i8 () cil managed
952         {
953                 .maxstack 16
954
955                 ldc.i4 32
956                 conv.i8
957                 conv.i8
958                 conv.i4
959                 ret
960         }                               
961
962         .method public static int32 test_15_lconv_to_u () cil managed
963         {
964         ldc.i8 0x10000000f
965                 conv.u
966                 conv.i4
967                 ret
968         }
969
970         .method public static int32 test_1234_fconv_u () cil managed {
971                 .maxstack 16
972
973                 ldc.r8 1234.0
974                 conv.u
975                 conv.i4
976                 ret
977         }
978
979         .method public static int32 test_0_get_type_from_handle_on_bblock_boundary () cil managed 
980         {
981                 .maxstack 16
982         
983                 ldc.i4.1
984                 brfalse OBJECT
985         
986                 ldtoken [mscorlib]System.String
987                 br AFTER
988         OBJECT:
989                 ldtoken [mscorlib]System.Object
990         AFTER:
991                 call class [mscorlib]'System.Type' class [mscorlib]'System.Type'::'GetTypeFromHandle'(valuetype [mscorlib]'System.RuntimeTypeHandle')
992                 callvirt instance string class [mscorlib]System.Type::get_FullName ()
993                 ldstr "System.String"
994                 callvirt instance bool class [mscorlib]System.Object::Equals(object)
995                 ldc.i4.0
996                 ceq
997                 ret 
998         }
999                 
1000         .method public static int32 test_0_bug59580  ()
1001         {
1002                 ldc.r4          float32(0x7FC00000)
1003                 ldc.r4          float32(0x7FC00000)
1004                 bge.un          pass
1005                 br              fail
1006         pass:
1007                 ldc.i4.0
1008                 ret
1009         fail:
1010                 ldc.i4.1
1011                 ret
1012         }
1013         
1014         .method public static int32 test_1_bug60056  () {
1015                 .locals init (int32 m5)
1016                         
1017                 ldc.i4.m1
1018                 stloc.0
1019                 
1020                 ldc.i4.1
1021                 conv.u8
1022                 
1023                 ldloc.0
1024                 conv.i8
1025                 mul
1026                 
1027                 ldc.i4.m1
1028                 conv.i8
1029                 ceq
1030                 ret
1031         }
1032         
1033         .method public static int32 test_1_conv_u8_cfold  () {
1034                 ldc.i4.m1
1035                 conv.u8
1036                 
1037                 ldc.i8 0x00000000ffffffff
1038                 
1039                 ceq
1040                 ret
1041         }
1042         
1043         .method public static int32 test_1_array_type_mismatch_ldelema  () {
1044                 .locals init (int32 r)
1045                 
1046                         ldc.i4.1
1047                         newarr string
1048                         ldc.i4.0 
1049                         ldelema string
1050                         pop
1051                 
1052                 .try {
1053                         ldc.i4.1
1054                         newarr string
1055                         ldc.i4.0 
1056                         ldelema object
1057                         pop
1058                         
1059                         leave end
1060                 } catch [mscorlib]System.ArrayTypeMismatchException {
1061                         pop
1062                         ldc.i4.1
1063                         stloc.0
1064                         leave end
1065                 }
1066         end:
1067                 ldloc.0
1068                 ret
1069         }
1070
1071         .method public static int32 test_1_conv_ovf_i8_with_i4 () {
1072                         ldc.i4.m1 
1073                         conv.ovf.i8
1074                         conv.ovf.i4
1075                         neg
1076                         ret
1077         }
1078
1079         // bug #72148
1080     .method public static int32 test_0_initlocals_float_ptr () {
1081         .maxstack 3
1082         .locals init (
1083                 float32[]       V_0,
1084                 float32& pinned V_1,
1085                 unsigned int32  V_2)
1086                         ldc.i4.s 0x0f
1087                         newarr [mscorlib]System.Single
1088                         stloc.0 
1089                         ldloc.0 
1090                         ldc.i4.0 
1091                         ldc.r4 1.13
1092                         stelem.r4 
1093                         ldloc.0 
1094                         ldc.i4.0 
1095                         ldelema [mscorlib]System.Single
1096                         stloc.1 
1097                         ldloc.1 
1098                         conv.i 
1099                         ldind.u4 
1100                         stloc.2 
1101                         ldc.i4.0
1102                         ret
1103         }
1104
1105         .method public static int32 test_7_conv_ovf_u8_un () {
1106         .maxstack  2
1107         .locals    init (unsigned int64)
1108
1109         ldc.i4.7
1110         conv.ovf.u8.un
1111         stloc.0
1112                 ldloc.0
1113                 conv.i4
1114         ret
1115         }
1116
1117         .method public static int32 test_7_conv_ovf_u4_un () {
1118         .maxstack  2
1119         .locals    init (unsigned int32)
1120
1121         ldc.i4.7
1122         conv.ovf.u4.un
1123         stloc.0
1124                 ldloc.0
1125                 conv.i4
1126         ret
1127         }
1128
1129         .method public static int32 test_1_bug_74591 () {
1130                 .maxstack 16
1131                 .locals init (int32)
1132
1133                 ldc.i4.m1
1134                 stloc.0
1135                 ldloc.0
1136                 conv.ovf.i8
1137                 ldc.i4.m1
1138                 conv.ovf.i8
1139                 mul.ovf
1140                 conv.i4
1141                 ret
1142         }
1143
1144         .class nested public auto ansi Integer
1145                 extends [mscorlib]System.Object {
1146
1147                 .field public bool n
1148
1149             .method public hidebysig  specialname  rtspecialname 
1150            instance default void .ctor (unsigned int64 i, bool n)  cil managed 
1151             {
1152                         .maxstack 8
1153                         ldarg.0
1154                         call instance void class [mscorlib]System.Object::.ctor()
1155                         ldarg.0
1156                         ldarg.2
1157                         stfld bool Tests/Integer::n
1158                         ret
1159                 }
1160         }
1161
1162         .method public static int32 test_1_bug_74726 () {
1163                 .maxstack 16
1164
1165                 ldc.i4.2
1166                 conv.ovf.u8
1167                 ldc.i4.1
1168                 conv.ovf.u8
1169                 mul.ovf.un
1170                 ldc.i4.1
1171                 newobj instance void class Tests/Integer::.ctor(unsigned int64, bool)
1172                 ldfld bool Tests/Integer::n
1173                 ldc.i4.1
1174                 ceq
1175                 ret
1176         }
1177
1178         .class nested private auto ansi sealed xxx
1179         extends [mscorlib]System.ValueType
1180    {
1181      .field  public   object a
1182
1183      .method public hidebysig  specialname  rtspecialname 
1184             instance default void .ctor ()  cil managed 
1185      {
1186                  .maxstack 8
1187                  ret 
1188      }
1189    } // end of class xxx
1190
1191         .method public static int32 test_0_newobj_vtype () {
1192                 .maxstack 6
1193                 .locals init (
1194                         valuetype Tests/xxx V_0
1195                 )
1196
1197                 newobj instance void valuetype Tests/xxx::.ctor ()
1198                 stloc.0
1199                 ldloca.s 0
1200                 ldfld object Tests/xxx::a
1201                 brfalse OK
1202                 ldc.i4.s 1
1203                 ret
1204         OK:
1205                 ldc.i4.s 0
1206                 ret
1207         }
1208
1209         .method public static int32 test_0_newobj_vtype_primitive () {
1210                 .maxstack 6
1211                 .locals init (
1212                         native int V_0
1213                 )
1214
1215                 ldc.i4.s 10
1216                 newobj instance void native int::'.ctor'(int32)
1217                 stloc.0
1218                 ldloc.0
1219                 ldc.i4.s 10
1220                 beq OK
1221                 ldc.i4.s 1
1222                 ret
1223         OK:
1224                 ldc.i4.s 0
1225                 ret
1226         }
1227
1228         .method public static int32 test_1_filters () {
1229                 .custom instance void [TestDriver]CategoryAttribute::.ctor(string) = ( 01 00 08 21 42 49 54 43 4F 44 45 00 00 )          // ...!BITCODE..
1230                 .maxstack 16
1231                 .locals init (
1232                         int32 res
1233                 )
1234
1235                 .try { // 0
1236                         .try {
1237                                 ldstr "OnErrorSub test Exception"
1238                                 newobj instance void class [mscorlib]System.Exception::.ctor(string)
1239                                 throw 
1240                                 leave.s IL_0033
1241                         }
1242                         filter {
1243                                 pop
1244                                 ldc.i4.0
1245                                 endfilter
1246                         } {
1247                                 pop
1248                                 // Should not be called
1249                                 ldc.i4.2
1250                                 stloc res
1251                                 leave.s IL_0033
1252                         }
1253                 }
1254                 filter {
1255                         pop
1256                         ldc.i4.1
1257                         endfilter 
1258                 } {
1259                   pop
1260                   ldc.i4.1
1261                   stloc res       
1262                   leave.s IL_0033
1263
1264                 }
1265                 IL_0033:
1266                 ldloc res
1267                 ret
1268         }
1269
1270         .class nested private auto ansi sealed beforefieldinit TheStruct
1271                 extends [mscorlib]System.ValueType {
1272                 .field public int32 a
1273                 .field public int32 b
1274         }
1275
1276         .method public static int32 test_5_cpobj () {
1277                 .maxstack 8
1278                 .locals init (  
1279                                 valuetype Tests/TheStruct v_0, 
1280                                 valuetype Tests/TheStruct v_1
1281                                          )
1282
1283                 ldloca v_0
1284                 ldc.i4.2
1285                 stfld int32 Tests/TheStruct::a
1286
1287                 ldloca v_0
1288                 ldc.i4.3
1289                 stfld int32 Tests/TheStruct::b
1290
1291                 ldloca v_1
1292                 ldloca v_0
1293                 cpobj Tests/TheStruct
1294
1295                 ldloca v_1
1296                 ldfld int32 Tests/TheStruct::a
1297                 ldloca v_1
1298                 ldfld int32 Tests/TheStruct::b
1299                 add
1300
1301                 ret
1302         }
1303
1304         .method public static int32 test_5_ldobj_stloc_optimization () {
1305                 .maxstack 8
1306                 .locals init (  
1307                                 valuetype Tests/TheStruct v_0, 
1308                                 valuetype Tests/TheStruct v_1
1309                                          )
1310
1311                 ldloca v_0
1312                 ldc.i4.2
1313                 stfld int32 Tests/TheStruct::a
1314
1315                 ldloca v_0
1316                 ldc.i4.3
1317                 stfld int32 Tests/TheStruct::b
1318
1319                 ldloca v_0
1320                 ldobj valuetype Tests/TheStruct
1321                 stloc.s v_1
1322
1323                 ldloca v_1
1324                 ldfld int32 Tests/TheStruct::a
1325                 ldloca v_1
1326                 ldfld int32 Tests/TheStruct::b
1327                 add
1328
1329                 ret
1330         }
1331
1332         .method public static int32 test_1_cpobj_reference () {
1333                 .maxstack 8
1334                 .locals init (  
1335                                 object v_0, 
1336                                 object v_1
1337                                          )
1338
1339                 newobj instance void object::.ctor()
1340                 stloc v_0
1341
1342                 ldloca v_1
1343                 ldloca v_0
1344                 cpobj object
1345
1346                 ldloc v_0
1347                 ldloc v_1
1348                 ceq
1349                 ret
1350         }
1351
1352         .method public static int32 test_1_initobj_reference () {
1353                 .maxstack 8
1354                 .locals init (  
1355                                 object v_0
1356                                          )
1357
1358                 newobj instance void object::.ctor()
1359                 stloc v_0
1360
1361                 ldloca v_0
1362                 initobj object
1363
1364                 ldloc v_0
1365                 ldnull
1366                 ceq
1367                 ret
1368         }
1369
1370         .method public static int32 test_1_ldobj_reference () {
1371                 .maxstack 8
1372                 .locals init (  
1373                                 object v_0
1374                                          )
1375
1376                 newobj instance void object::.ctor()
1377                 stloc v_0
1378
1379                 ldloc v_0
1380                 ldloca v_0
1381                 ldobj object
1382                 ceq
1383                 ret
1384         }
1385
1386         .method public static int32 test_5_vtype_on_bb_boundary () {
1387                 .maxstack 8
1388                 .locals init (  
1389                                 valuetype Tests/TheStruct v_0, 
1390                                 valuetype Tests/TheStruct v_1
1391                                          )
1392
1393                 ldloca v_0
1394                 ldc.i4.2
1395                 stfld int32 Tests/TheStruct::a
1396
1397                 ldloca v_0
1398                 ldc.i4.3
1399                 stfld int32 Tests/TheStruct::b
1400
1401                 ldloc v_0
1402                 br L_0
1403         L_0: stloc v_1
1404
1405                 ldloca v_1
1406                 ldfld int32 Tests/TheStruct::a
1407                 ldloca v_1
1408                 ldfld int32 Tests/TheStruct::b
1409                 add
1410                 ret
1411         }
1412
1413         .method public static int32 test_5_different_in_stacks () cil managed {
1414                 .maxstack 16
1415
1416                         ldc.i4.1
1417                         ldc.i4.1
1418                         beq L_0
1419
1420                         ldc.i4.3
1421                         ldc.i4.3
1422                         br L_1
1423                         ldc.i4.3
1424                         ldc.i4.3
1425                         br L_2
1426          L_0:   ldc.i4.2
1427                         ldc.i4.3
1428                         ldc.i4.1
1429                         ldc.i4.1
1430                         beq L_2
1431          L_1:   add
1432                         ret
1433          L_2:   add
1434                         ret
1435         }
1436
1437         .method public static int32 test_3_larray_get_set () {
1438                 .locals init (
1439                         int32[2]        V_0)
1440                           
1441                         ldc.i4.2 
1442                         newobj instance void int32[0...]::.ctor(int32)
1443                         stloc.0 
1444                         ldloc.0 
1445                         ldc.i4.0 
1446                         ldc.i4 1
1447                         call instance void int32[0...]::Set(int32, int32)
1448                     ldloc.0 
1449                     ldc.i4.1 
1450                         ldc.i4 2
1451                         call instance void int32[0...]::Set(int32, int32)
1452
1453                         ldloc.0
1454                         ldc.i4.0
1455                         call instance int32 int32[0...]::Get(int32)
1456                         ldloc.0
1457                         ldc.i4.1
1458                         call instance int32 int32[0...]::Get(int32)
1459                         add
1460                         ret
1461         }
1462
1463         .method public static int32 test_0_pop_side_effects () {
1464                 .try {
1465                         ldc.r8 1
1466                         ldc.r8 0
1467                         div
1468                         ckfinite
1469                         pop
1470                         leave FAIL
1471                 }
1472                 catch [mscorlib]System.ArithmeticException {
1473                         pop
1474                         leave L_0
1475                 }
1476                 L_0:
1477                 ldc.i4.0
1478                 ret
1479                 FAIL:
1480                 ldc.i4.1
1481                 ret
1482         }
1483
1484         .method public static void regalloc_regress_78314_helper (object o) cil managed
1485         {
1486                 ret
1487         }
1488
1489         .method public static int32 test_1_regalloc_regress_78314 () cil managed
1490         {
1491     // Code size       68 (0x44)
1492     .maxstack  6
1493     .locals init (int32 V_0, bool V_1)
1494     IL_0000:  ldc.i4.0
1495     IL_0001:  stloc.0
1496     IL_0002:  br.s       IL_003b
1497
1498     IL_0004:
1499     IL_001e:  ldc.i4.s   10
1500     IL_0020:  ldloc.0
1501     IL_0021:  shl
1502     IL_0022:  ldc.i4.s   10
1503     IL_0024:  ldloc.0
1504     IL_0025:  shl
1505     IL_0026:  ceq
1506     IL_0028:  box        [mscorlib]System.Boolean
1507     IL_0032:  call       void Tests::regalloc_regress_78314_helper(object)
1508     IL_0037:  ldloc.0
1509     IL_0038:  ldc.i4.1
1510     IL_0039:  add
1511     IL_003a:  stloc.0
1512     IL_003b:  ldloc.0
1513     IL_003c:  ldc.i4.8
1514     IL_003f:  blt.s      IL_0004
1515
1516         ldloc.0
1517         ldc.i4.8
1518         ceq
1519         conv.i4
1520         ret     
1521   }
1522
1523         .method public static void try_block_end_remove_if_useless () cil managed {
1524             .maxstack  8
1525
1526             T_START:
1527                 ldstr   "Start"
1528                         pop
1529                 leave.s COMPLETE
1530             T1_END:
1531
1532             COMPLETE:
1533                 ret
1534
1535             F1_START:
1536                 ldstr   "Finally1"
1537                         pop
1538                 endfinally
1539             F1_END:
1540
1541             .try T_START to T1_END finally handler F1_START to F1_END
1542         }
1543
1544         .method public static int32 test_0_try_block_end_remove_if_useless () cil managed {
1545                 call void class Tests::try_block_end_remove_if_useless ()
1546                 ldc.i4.0
1547                 ret
1548         }
1549
1550    .method private static int32 test_0_regress_78629_switch_next_ins_target ()  cil managed
1551     {
1552         ldc.i4.0
1553         switch (target)
1554         target: ldstr "bar"
1555                 pop
1556                 ldc.i4.0
1557         ret
1558     }
1559
1560         // This belongs to basic-float.cs, but its hard to tell mcs/csc to
1561         // generate the non .un version of the opcodes
1562     .method private static  hidebysig 
1563            default int32 test_4_float_branch_nan ()  cil managed 
1564     {
1565         // Method begins at RVA 0x27a4
1566         // Code size 74 (0x4a)
1567         .maxstack 2
1568         .locals init (
1569                 float64 V_0,
1570                 float64 V_1,
1571                 int32   V_2)
1572         IL_0000:  ldc.r8 (00 00 00 00 00 00 f8 ff)
1573         IL_0009:  stloc.0 
1574         IL_000a:  ldc.r8 1.
1575         IL_0013:  stloc.1 
1576         IL_0014:  ldc.i4.0 
1577         IL_0015:  stloc.2 
1578         IL_0016:  ldloc.0 
1579         IL_0017:  ldloc.1 
1580         IL_0018:  bge.s IL_001a
1581
1582                                 br L1
1583         IL_001a:  ldloc.2 
1584         IL_001b:  ret 
1585         L1:
1586         IL_001c:  ldloc.2 
1587         IL_001d:  ldc.i4.1 
1588         IL_001e:  add 
1589         IL_001f:  stloc.2 
1590         IL_0020:  ldloc.0 
1591         IL_0021:  ldloc.1 
1592         IL_0022:  ble.s IL_002e
1593                                 br L2
1594         IL_002e:  ldloc.2 
1595         IL_002f:  ret 
1596         L2:
1597         IL_0030:  ldloc.2 
1598         IL_0031:  ldc.i4.1 
1599         IL_0032:  add 
1600         IL_0033:  stloc.2 
1601         IL_0034:  ldloc.0 
1602         IL_0035:  ldloc.1 
1603         IL_0036:  blt.s IL_0038
1604                                 br L3           
1605         IL_0038:  ldloc.2 
1606         IL_0039:  ret 
1607         L3:
1608         IL_003a:  ldloc.2 
1609         IL_003b:  ldc.i4.1 
1610         IL_003c:  add 
1611         IL_003d:  stloc.2 
1612         IL_003e:  ldloc.0 
1613         IL_003f:  ldloc.1 
1614         IL_0040:  bgt.s IL_0042
1615                                 br L4
1616         IL_0042:  ldloc.2 
1617         IL_0043:  ret 
1618         L4:
1619         IL_0044:  ldloc.2 
1620         IL_0045:  ldc.i4.1 
1621         IL_0046:  add 
1622         IL_0047:  stloc.2 
1623         IL_0048:  ldloc.2 
1624         IL_0049:  ret 
1625     } // end of method Tests::test_5_float_branch_nan
1626
1627     .method private static  hidebysig
1628            default void regress_80622_inner (object x)  cil managed
1629     {
1630                 .locals init (unsigned int8 i)
1631         // Method begins at RVA 0x2050
1632         // Code size 14 (0xe)
1633         .maxstack 8
1634         IL_1000:  ldarg.0
1635         IL_1001:  unbox unsigned int8
1636         IL_1006:  ldobj unsigned int8
1637         IL_000b:  conv.ovf.i4.un
1638         IL_000c:  pop
1639         IL_000d:  ret
1640     }
1641
1642     // method line 2
1643     .method private static  hidebysig
1644            default int32 test_0_regress_80622 ()  cil managed
1645     {
1646         .maxstack 8
1647         IL_0000:  ldc.i4 255
1648         IL_0005:  box unsigned int8
1649         IL_000a:  call void class Tests::regress_80622_inner (object)
1650                 ldc.i4.0
1651         IL_000f:  ret
1652     }
1653
1654         .method private static default int32 test_0_regresss_80190 () cil managed
1655         {
1656             .maxstack  2
1657             .locals init (int32 V_0,
1658                      int32* V_1)
1659             IL_0000:  nop
1660             IL_0001:  nop
1661             IL_0002:  ldloca.s   V_0
1662             IL_0004:  conv.u
1663             IL_0005:  stloc.1
1664             IL_0006:  ldloc.1
1665             IL_0007:  ldc.i4.3
1666             IL_0008:  stind.i4
1667             IL_0009:  nop
1668                                   ldc.i4.0
1669                                   ret
1670         }
1671
1672         .class interface nested public auto ansi abstract IFaceWithStaticMethod
1673         {
1674             .method public static  specialname 
1675                default void foo ()  cil managed noinlining 
1676             {
1677                 .maxstack 0
1678                 IL_0000:  ret 
1679         }
1680         }
1681         
1682         .class nested public auto ansi AClass extends [mscorlib]System.Object implements Tests/IFaceWithStaticMethod
1683         {
1684             .method public hidebysig  specialname  rtspecialname 
1685            instance default void .ctor ()  cil managed 
1686             {
1687                         .maxstack 8
1688                         ret
1689                 }
1690
1691         }
1692
1693         // Test that static methods in interfaces are ignored during vtable construction
1694         .method private static default int32 test_0_ifaces_with_static_methods () cil managed
1695         {
1696                 .maxstack 16
1697
1698                 newobj instance void class Tests/AClass::.ctor()
1699                 pop
1700                 ldc.i4.0
1701                 ret
1702         }
1703
1704         .method private static hidebysig default int32 Foo<T> (!!T n)  cil managed {
1705                 ldarg.0
1706                 box !!0
1707                 brtrue HAS_VALUE
1708                 ldc.i4.0
1709                 ret
1710 HAS_VALUE:      ldc.i4.1
1711                 ret
1712         }
1713
1714         // bug 78019
1715         .method static public int32 test_0_nullable_box_brtrue () cil managed {
1716
1717                 .locals init (valuetype [mscorlib]System.Nullable`1<int32> V_0)
1718
1719                 ldloc.0
1720                 call int32 class Tests::Foo<valuetype [mscorlib]System.Nullable`1<int32>> (!!0)
1721                 ret
1722         }
1723
1724         //Bug 372410
1725         .method static public int32 test_0_ldelema_type_check () cil managed {
1726                 .maxstack 16
1727                 .locals init (object[] V_0,
1728                                           object[,] V_1)
1729
1730                 ldc.i4.1
1731                 newarr object
1732                 stloc.0
1733
1734                 .try {
1735                         ldloc.0
1736                         ldc.i4.0
1737                         ldelema object
1738                         leave L1
1739                 } catch [mscorlib]System.ArrayTypeMismatchException {
1740                         leave ERROR1
1741                 }
1742
1743         L1:
1744                 ldc.i4.1
1745                 newarr string
1746                 stloc.0
1747
1748                 .try {
1749                         ldloc.0
1750                         ldc.i4.0
1751                         ldelema object
1752                         leave ERROR2
1753                 } catch [mscorlib]System.ArrayTypeMismatchException {
1754                         leave L2
1755                 }
1756
1757         L2:
1758                         ldc.i4.1
1759                 newarr string
1760                 stloc.0
1761
1762                 .try {
1763                         ldloc.0
1764                         ldc.i4.0
1765                         readonly. ldelema object
1766                         leave L3
1767                 } catch [mscorlib]System.ArrayTypeMismatchException {
1768                         leave ERROR3
1769                 }
1770
1771         L3:
1772                 ldc.i4.0
1773                 ret
1774
1775
1776         ERROR1:
1777                 ldc.i4.1
1778                 ret
1779
1780         ERROR2:
1781                 ldc.i4.2
1782                 ret
1783
1784         ERROR3:
1785                 ldc.i4.3
1786                 ret
1787         }
1788
1789
1790         //Bug 372410
1791         .method static public int32 test_0_array_address_type_check () cil managed {
1792                 .maxstack 16
1793                 .locals init (object[] V_0,
1794                                           object[,] V_1)
1795
1796                 ldc.i4.1 
1797             ldc.i4.1 
1798             newobj instance void object[,]::.ctor(int32, int32)
1799                 stloc.1
1800
1801                 .try {
1802                         ldloc.1
1803                         ldc.i4.0
1804                         ldc.i4.0
1805                         call instance object&  object[,]::Address(int32, int32)
1806                         leave L4
1807                 } catch [mscorlib]System.ArrayTypeMismatchException {
1808                         leave ERROR4
1809                 }
1810
1811         L4:
1812                 ldc.i4.1 
1813             ldc.i4.1 
1814             newobj instance void string[,]::.ctor(int32, int32)
1815                 stloc.1
1816
1817                 .try {
1818                         ldloc.1
1819                         ldc.i4.0
1820                         ldc.i4.0
1821                         call instance object&  object[,]::Address(int32, int32)
1822                         leave ERROR5
1823                 } catch [mscorlib]System.ArrayTypeMismatchException {
1824                         leave L5
1825                 }
1826
1827         L5:
1828                 ldc.i4.1 
1829             ldc.i4.1 
1830             newobj instance void string[,]::.ctor(int32, int32)
1831                 stloc.1
1832
1833                 .try {
1834                         ldloc.1
1835                         ldc.i4.0
1836                         ldc.i4.0
1837                         readonly. call instance object&  object[,]::Address(int32, int32)
1838                         leave L6
1839                 } catch [mscorlib]System.ArrayTypeMismatchException {
1840                         leave ERROR6
1841                 }
1842
1843         L6:
1844                 ldc.i4.0
1845                 ret
1846         ERROR4:
1847                 ldc.i4.4
1848                 ret
1849
1850         ERROR5:
1851                 ldc.i4.5
1852                 ret
1853
1854         ERROR6:
1855                 ldc.i4.6
1856                 ret
1857         }
1858
1859         .field public  static unsigned int64 'ull'
1860
1861         .field public  static int32 'shift2'
1862
1863         .method public static int32 test_0_long_shift_regalloc () cil managed
1864         {
1865                 .locals init (unsigned int32 'cilsimp.28', unsigned int64 'cilsimp.27', int32 'cilsimp.26')
1866
1867                 .maxstack 4
1868
1869                 ldc.i8  81985529234382576
1870                 stsfld  unsigned int64 Tests::ull
1871             ldc.i4      60
1872                 stsfld  int32 Tests::shift2
1873
1874                 ldsfld  unsigned int64 Tests::ull
1875                 stloc   'cilsimp.27'
1876                 ldsfld  int32 Tests::shift2
1877                 stloc   'cilsimp.28'
1878                 ldloc   'cilsimp.27'
1879                 ldloc   'cilsimp.28'
1880                 shr.un
1881                 ldloc   'cilsimp.27'
1882                 ldc.i4  64
1883                 ldloc   'cilsimp.28'
1884                 sub
1885                 shl
1886                 or
1887                 ldc.i8  1311768467750121216
1888                 ceq
1889                 ldc.i4.1
1890                 xor
1891                 conv.u4
1892                 ret
1893         }
1894
1895         // Test calling ldfld directly on a vtype instead of a vtype address
1896         .method public static int32 test_5_call_ldfld_vtype () cil managed
1897         {
1898                 .maxstack 16
1899                 .locals init (
1900                         valuetype Tests/TailCallStruct arg
1901                 )
1902                 ldloca 0
1903                 ldc.i4.2
1904                 stfld int32 Tests/TailCallStruct::a
1905                 ldloca 0
1906                 ldc.i4.4
1907                 stfld int32 Tests/TailCallStruct::b
1908                 ldloc.0
1909                 call valuetype Tests/TailCallStruct Tests::tail2 (valuetype Tests/TailCallStruct)
1910                 ldfld int32 Tests/TailCallStruct::a
1911                 ret
1912         }
1913
1914         .method public static int32 throw_ret () cil managed
1915         {
1916                 ldstr "FOO"
1917                 newobj instance void class [mscorlib]System.OverflowException::.ctor(string)
1918                 throw
1919                 ldc.i4.4
1920                 ret
1921         }
1922
1923         .method public static int32 throw2_ret () cil managed
1924         {
1925                 // Disable inlining
1926                 ldc.i4.5
1927                 localloc
1928                 pop
1929
1930                 call int32 Tests::throw_ret ()
1931                 ret
1932         }
1933
1934         // Test inlining a method which contains just a throw
1935         .method public static int32 test_0_inline_throw () cil managed
1936         {
1937                 .maxstack 16
1938                 .locals init (
1939                                 int32 v_0
1940                 )
1941
1942                 .try {
1943                         call int32 Tests::throw2_ret ()
1944                         stloc.0
1945                         leave L0
1946                 } catch [mscorlib]System.OverflowException {
1947                         pop
1948                         leave L1
1949                 }
1950
1951                 L0:
1952                         ldc.i4.1
1953                         ret
1954                 L1:
1955                         ldc.i4.0
1956                         ret                     
1957         }
1958
1959     .method public static int32 test_0_stelem_any_null_opt () cil managed
1960     {
1961                 .maxstack 16
1962                 .locals init (
1963                                 object[]        V_0,
1964                                 int32   V_1)
1965
1966                 ldc.i4.s 10
1967                 newarr [mscorlib]System.Object
1968                 stloc.0
1969
1970                 ldc.i4.0
1971                 stloc.1
1972                 br L0
1973
1974         L1:
1975                 ldloc.0
1976                 ldloc.1
1977                 ldnull
1978                 stelem.any [mscorlib]System.Object
1979                 ldloc.1
1980                 ldc.i4.1
1981                 add
1982                 stloc.1
1983         L0:
1984                 ldloc.1
1985                 ldc.i4.s 10
1986                 blt L1
1987
1988                 ldc.i4.0
1989                 ret
1990         }
1991
1992     // method line 2
1993     .method public static  hidebysig 
1994            default int32 manyargs_callee (int32 a, int32 b, int32 c, int32 d, int32 e, int32 f, int32 g, int32 h, int32 i, int32 j, int32 k, int32 l, int32 m, int32 n, int32 o, int32 p)  cil managed 
1995     {
1996         // Method begins at RVA 0x20f4
1997         // Code size 44 (0x2c)
1998         .maxstack 8
1999         IL_0000:  ldarg.0 
2000         IL_0001:  ldarg.1 
2001         IL_0002:  add 
2002         IL_0003:  ldarg.2 
2003         IL_0004:  add 
2004         IL_0005:  ldarg.3 
2005         IL_0006:  add 
2006         IL_0007:  ldarg.s 4
2007         IL_0009:  add 
2008         IL_000a:  ldarg.s 5
2009         IL_000c:  add 
2010         IL_000d:  ldarg.s 6
2011         IL_000f:  add 
2012         IL_0010:  ldarg.s 7
2013         IL_0012:  add 
2014         IL_0013:  ldarg.s 8
2015         IL_0015:  add 
2016         IL_0016:  ldarg.s 9
2017         IL_0018:  add 
2018         IL_0019:  ldarg.s 10
2019         IL_001b:  add 
2020         IL_001c:  ldarg.s 11
2021         IL_001e:  add 
2022         IL_001f:  ldarg.s 12
2023         IL_0021:  add 
2024         IL_0022:  ldarg.s 13
2025         IL_0024:  add 
2026         IL_0025:  ldarg.s 14
2027         IL_0027:  add 
2028         IL_0028:  ldarg.s 15
2029         IL_002a:  add 
2030         IL_002b:  ret 
2031     } // end of method main::callee
2032
2033     // method line 3
2034     .method public static  hidebysig 
2035            default int32 manyargs_tail_caller (int32 a, int32 b, int32 c, int32 d, int32 e, int32 f, int32 g, int32 h, int32 i, int32 j, int32 k, int32 l, int32 m, int32 n, int32 o, int32 p)  cil managed 
2036     {
2037         // Method begins at RVA 0x2124
2038         // Code size 34 (0x22)
2039         .maxstack 17
2040         IL_0000:  ldarg.0 
2041                           ldc.i4.1
2042                           add
2043         IL_0001:  ldarg.1 
2044         IL_0002:  ldarg.2 
2045         IL_0003:  ldarg.3 
2046         IL_0004:  ldarg.s 4
2047         IL_0006:  ldarg.s 5
2048         IL_0008:  ldarg.s 6
2049         IL_000a:  ldarg.s 7
2050         IL_000c:  ldarg.s 8
2051         IL_000e:  ldarg.s 9
2052         IL_0010:  ldarg.s 10
2053         IL_0012:  ldarg.s 11
2054         IL_0014:  ldarg.s 12
2055         IL_0016:  ldarg.s 13
2056         IL_0018:  ldarg.s 14
2057                           ldc.i4.1
2058                           add
2059         IL_001a:  ldarg.s 15
2060                           ldc.i4.1
2061                           add
2062                   tail.
2063         IL_001c:  call int32 class Tests::manyargs_callee(int32, int32, int32, int32, int32, int32, int32, int32, int32, int32, int32, int32, int32, int32, int32, int32)
2064         IL_0021:  ret 
2065     } // end of method main::caller
2066
2067     // method line 4
2068     .method public static  hidebysig 
2069            default int32 test_139_many_args_tail_call ()  cil managed
2070     {
2071                 // Some platforms might not be able to AOT tail calls
2072                 .custom instance void class [TestDriver]CategoryAttribute::'.ctor'(string) =  (01 00 08 21 46 55 4C 4C 41 4F 54 00 00 ) // ...!FULLAOT..
2073
2074         // Method begins at RVA 0x2154
2075         // Code size 43 (0x2b)
2076         .maxstack 17
2077         IL_0000:  ldc.i4.1 
2078         IL_0001:  ldc.i4.2 
2079         IL_0002:  ldc.i4.3 
2080         IL_0003:  ldc.i4.4 
2081         IL_0004:  ldc.i4.5 
2082         IL_0005:  ldc.i4.6 
2083         IL_0006:  ldc.i4.7 
2084         IL_0007:  ldc.i4.8 
2085         IL_0008:  ldc.i4.s 0x09
2086         IL_000a:  ldc.i4.s 0x0a
2087         IL_000c:  ldc.i4.s 0x0b
2088         IL_000e:  ldc.i4.s 0x0c
2089         IL_0010:  ldc.i4.s 0x0d
2090         IL_0012:  ldc.i4.s 0x0e
2091         IL_0014:  ldc.i4.s 0x0f
2092         IL_0016:  ldc.i4.s 0x10
2093         IL_0018:  call int32 class Tests::manyargs_tail_caller(int32, int32, int32, int32, int32, int32, int32, int32, int32, int32, int32, int32, int32, int32, int32, int32)
2094         IL_0028:  ret 
2095     } // end of method main::Main
2096
2097         .class nested private auto ansi beforefieldinit R1
2098            extends [mscorlib]System.MarshalByRefObject
2099         {
2100                 .field  public  int32 test_field
2101
2102         .method public hidebysig  specialname  rtspecialname
2103                         instance default void '.ctor' ()  cil managed
2104         {
2105                         ret
2106                 }
2107         }
2108
2109         .method public static hidebysig
2110                         default int32 return_0 () cil managed
2111         {
2112                 ldc.i4.0
2113                 ret
2114         }
2115
2116         .method public static hidebysig
2117                         default int32 test_1_volatile_marshalbyref_bug_432673 () cil managed
2118         {
2119                 .locals init (
2120                         class Tests/R1 v_0
2121                 )
2122
2123                 newobj instance void class Tests/R1::.ctor ()
2124                 stloc.0
2125                 ldloc.0
2126                 ldc.i4.0
2127                 volatile.
2128                 stfld int32 Tests/R1::test_field
2129                 call int32 class Tests::return_0 ()
2130                 ldc.i4.1
2131                 add
2132                 ret
2133         }
2134
2135         .method public static default int32 return_2 () cil managed
2136         {
2137                 // Prevent inlining
2138                 ldc.i4.s 16
2139         localloc
2140                 pop
2141                 ldc.i4.s 2
2142                 ret
2143         }
2144
2145         .method public static hidebysig
2146                         default int32 test_1_cmov_opt_regress_463357 () cil managed
2147         {
2148                 call int32 class Tests::return_2 ()
2149                 ldc.i4.0
2150                 ceq
2151                 brfalse L1
2152                 ldc.i4.0
2153                 ret
2154                 br L2
2155         L1: nop
2156         L2: nop
2157                 ldc.i4.1
2158                 ret
2159         }
2160
2161    .method public static hidebysig default int32 cmov_opt_regress_474718_inner (int32 A_1)  cil managed 
2162    {
2163       .maxstack 3
2164       .locals init (int32 V_0, bool V_1, bool V_2)
2165       
2166           ldc.i4.0
2167       IL_000b:  stloc.1 
2168       IL_000d:  br IL_002f
2169
2170           ldc.i4.1    
2171           stloc.2
2172       IL_001e:  ldloc.2 
2173       IL_001f:  brfalse IL_0036
2174
2175       IL_0024:  
2176       IL_002a:  br IL_0041
2177     
2178       IL_002f:  ldloc.1
2179       IL_0030:  stloc.2 
2180       IL_0031:  br IL_001e
2181     
2182       IL_0036:  ldc.i4 0
2183       IL_003b:  stloc.0 
2184       IL_003c:  br IL_0041
2185     
2186       IL_0041:  ldloc.0 
2187       IL_0042:  ret 
2188   } 
2189
2190     .method public static default int32 test_0_cmov_opt_regress_474718 ()  cil managed 
2191     {
2192         .maxstack 16
2193         ldc.i4.1
2194         call int32 Tests::cmov_opt_regress_474718_inner (int32)
2195         ret
2196    }
2197
2198         .method public static default int32 test_5_createarr_newobj () cil managed
2199         {
2200                 .maxstack 16
2201
2202                 ldc.i4 5
2203                 newobj void char[]::.ctor(int32)
2204                 ldlen
2205                 ret
2206         }
2207
2208         .method public static default int32 test_0_initblk_3_regress_481458 () cil managed
2209         {
2210                 .maxstack 16
2211                 .locals init (native int)
2212
2213                 ldc.i4.s 10
2214                 localloc
2215                 stloc.0
2216
2217                 // Set the first value to 3
2218                 ldloc.0
2219                 ldc.i4.0
2220                 add             //addr
2221                 ldc.i4.3        //value
2222                 stind.i1
2223
2224                 // Zero out the first 3 values
2225                 ldloc.0         //addr
2226                 ldc.i4.0        //value
2227                 ldc.i4.s 3      //size
2228                 initblk
2229
2230                 // Load the first value
2231                 ldloc.0
2232                 ldc.i4.0
2233                 add     
2234                 ldind.u1
2235                 conv.i4
2236                 ret
2237         }
2238
2239         .method public static float32 GetFloat32() cil managed noinlining
2240         {
2241                 .maxstack  8
2242                 ldc.r8     0.19975845134874831
2243                 ret
2244         }
2245
2246 /*         Disabled until they can be fixed to run on amd64
2247         .method public static default int32 test_0_implicit_float_to_double_conversion () cil managed
2248         {
2249                 .maxstack 16
2250
2251                 call float32 Tests::GetFloat32()
2252                 ldc.r8     0.19975845134874831
2253                 beq OK
2254
2255                 ldc.i4.1
2256                 ret
2257 OK:
2258                 ldc.i4.0
2259                 ret
2260         }
2261 */
2262
2263         .method public static default int32 test_0_long_to_r8_un_overflow () cil managed
2264         {
2265                 .maxstack 16
2266                 ldc.i8     0x00FFFFFFFFFFFFFF
2267                 conv.r.un
2268                 conv.i8
2269                 ldc.i8 0x100000000000000
2270                 beq OK_1
2271
2272                 ldc.i4.1
2273                 ret
2274 OK_1:
2275                 ldc.i8     0x00FFFFFFFFFFFFFF
2276                 conv.r.un
2277                 conv.r8
2278                 conv.i8
2279                 ldc.i8 0x100000000000000
2280                 beq OK_2
2281
2282                 ldc.i4.2
2283                 ret
2284 OK_2:
2285                 ldc.i4.0
2286                 ret
2287         }
2288
2289         .field public static int32 shift1
2290
2291         .method public static int32 regress_497271_helper (int32 i) cil managed
2292         {
2293                 ldarg.0
2294                 ret
2295         }
2296
2297         .method public static int32 test_0_regalloc_regress_497271 () cil managed
2298         {
2299                 .locals init (int32 var)
2300
2301                 ldc.i4  4
2302                 stsfld  int32 Tests::shift1
2303                 ldsfld  int32 Tests::shift1
2304                 stloc   var
2305                 ldc.i4  4660
2306                 ldloc   var
2307                 shr.un
2308                 ldc.i4  4660
2309                 ldc.i4  32
2310                 ldloc   var
2311                 sub
2312                 shl
2313                 or
2314                 ldc.i4  1073742115
2315                 beq     ?L10
2316 ?L9:
2317                 ldc.i4  1
2318                 call    int32 Tests::regress_497271_helper (int32)
2319                 ret
2320 ?L10:
2321                 ldc.i4  0
2322                 call    int32 Tests::regress_497271_helper (int32)
2323                 ret
2324         }
2325
2326    .field  private static  int32 Value
2327
2328   .method public static hidebysig  specialname 
2329           default int32 regress_513931_inner ()  cil managed 
2330     {                                                                 
2331         // Method begins at RVA 0x225c                                
2332         // Code size 52 (0x34)                                        
2333         .maxstack 2                                                   
2334         .locals init (                                                
2335                 int32   V_0,                                          
2336                 int32   V_1,                                          
2337                 bool    V_2)
2338                        
2339                                 ldc.i4 999
2340                                 stsfld int32 Tests::Value
2341
2342         IL_0000:  nop                                                 
2343         IL_0001:  ldsfld int32 Tests::Value      
2344         IL_0006:  stloc.0                                             
2345         IL_0007:  ldloc.0                                             
2346         IL_0008:  ldc.i4.0                                            
2347         IL_0009:  cgt                                                 
2348         IL_000b:  ldc.i4.0                                            
2349         IL_000c:  ceq                                                 
2350         IL_000e:  stloc.2                                             
2351         IL_000f:  ldloc.2                                             
2352         IL_0010:  brtrue.s IL_0027                                    
2353
2354         IL_0012:  nop 
2355         IL_0013:  ldloc.0 
2356         IL_0014:  ldc.i4.s 0x7b
2357         IL_0016:  ceq          
2358         IL_0018:  ldc.i4.0     
2359         IL_0019:  ceq          
2360         IL_001b:  stloc.2      
2361         IL_001c:  ldloc.2      
2362         IL_001d:  brtrue.s IL_0023
2363
2364         IL_001f:  ldc.i4.m1 
2365         IL_0020:  stloc.1   
2366         IL_0021:  br.s IL_0032
2367
2368         IL_0023:  ldc.i4.1 
2369         IL_0024:  stloc.1  
2370         IL_0025:  br.s IL_0032
2371
2372         IL_0027:  
2373         IL_002c:  newobj instance void class [mscorlib]System.Exception::'.ctor'()
2374         IL_0031:  throw                                                                            
2375         IL_0032:  ldloc.1                                                                          
2376         IL_0033:  ret                                                                              
2377     }
2378
2379         .method public static hidebysig  specialname 
2380          default int32 test_0_regress_513931 ()  cil managed 
2381         {
2382                 call int32 Tests::regress_513931_inner ()
2383                 pop
2384                 ldc.i4.0
2385                 ret
2386         }
2387
2388         .method public static default int32 test_0_newarr_i8 () cil managed
2389         {
2390                 ldc.i4 1000
2391                 conv.i8
2392                 newarr [mscorlib]System.Boolean
2393                 pop
2394                 ldc.i4 0
2395                 ret
2396         }
2397
2398         .method public static specialname 
2399                default int32 return_1_noinline ()  cil managed noinlining 
2400         {
2401                 .maxstack 0
2402
2403                 ldc.i4.1
2404                 ret 
2405         }
2406
2407         // Only happens with -O=-deadce,cmov
2408         .method public static default int32 test_0_cmov_unused_582322 () cil managed
2409         {
2410         .maxstack 2                                                   
2411         .locals init (                                                
2412                                 int32 V_0
2413                 )                               
2414                 call int32 Tests::return_1_noinline ()
2415                 ldc.i4.1
2416                 bne.un L0
2417                 ldloc.s 0
2418                 pop
2419         L0:
2420                 ldc.i4.0
2421                 ret
2422         }
2423
2424     .method public static  hidebysig 
2425            default int32 test_0_regress_586664 ()  cil managed 
2426     {                                        
2427         // Method begins at RVA 0x20f4       
2428         // Code size 76 (0x4c)               
2429         .maxstack 6                          
2430         .locals init (                       
2431                 float64 V_0,                 
2432                 float64[]       V_1)         
2433         IL_0000:  ldc.r8 1.                  
2434         IL_0009:  ldc.r8 2.                  
2435         IL_0012:  ldc.r8 1.                  
2436         IL_001b:  call float64 class [mscorlib]System.Math::Pow(float64, float64)
2437         IL_0020:  div                                                            
2438         IL_0021:  stloc.0                                                        
2439         IL_0022:  ldc.i4.2                                                       
2440         IL_0023:  newarr [mscorlib]System.Double                                 
2441         IL_0028:  dup                                                            
2442         IL_0029:  ldc.i4.0                                                       
2443         IL_002a:  ldloc.0                                                        
2444         IL_002b:  neg                                                            
2445         IL_002c:  stelem.r8                                                      
2446         IL_002d:  dup                                                            
2447         IL_002e:  ldc.i4.1                                                       
2448         IL_002f:  ldloc.0
2449         IL_0030:  neg
2450         IL_0031:  stelem.r8
2451         IL_0032:  stloc.1
2452         IL_0033:  ldloc.1
2453         IL_0034:  ldc.i4.0
2454         IL_0035:  ldelem.r8
2455         IL_0036:  ldc.r8 -0.5
2456         IL_003f:  bne.un IL_004a
2457
2458         IL_0044:  ldc.i4.0
2459         IL_0045:  br IL_004b
2460
2461         IL_004a:  ldc.i4.1
2462         IL_004b:  ret
2463     }
2464
2465         .method public static int32 test_2_leave_multiple_blocks_from_end ()
2466         {
2467                 .locals init (int32 V_0)
2468
2469                 .try {
2470                         .try {
2471                                 nop
2472                                 nop
2473                                 leave END
2474                         } finally {
2475                                 ldloc.0
2476                                 ldc.i4.1
2477                                 add
2478                                 stloc.0
2479                                 endfinally
2480                         }
2481                         nop
2482                         leave END
2483                 } finally {
2484                         ldloc.0
2485                         ldc.i4.1
2486                         add
2487                         stloc.0
2488                         endfinally
2489                 }
2490 END:
2491                 ldloc.0
2492                 ret
2493         }
2494
2495         .method public static int32 test_3_leave_multiple_blocks_from_hole ()
2496         {
2497                 .locals init (int32 V_0)
2498
2499                 .try {
2500                         .try {
2501                                 ldloc.0
2502                                 brtrue REST
2503                                 leave BEFORE_END
2504 REST:
2505                                 nop
2506                                 nop
2507                                 leave END
2508                         } finally {
2509                                 ldloc.0
2510                                 ldc.i4.1
2511                                 add
2512                                 stloc.0
2513                                 endfinally
2514                         }
2515                         nop
2516                         leave END
2517                 } finally {
2518                         ldloc.0
2519                         ldc.i4.1
2520                         add
2521                         stloc.0
2522                         endfinally
2523                 }
2524 BEFORE_END:
2525                 ldloc.0
2526                 ldc.i4.1
2527                 add
2528                 stloc.0
2529 END:
2530                 ldloc.0
2531                 ret
2532         }
2533
2534         .class nested private auto ansi sealed beforefieldinit Pair`2<TKey,TValue>
2535                    extends [mscorlib]System.ValueType
2536         {
2537                 .field  public  !0 key
2538         .field  public  !1 'value'
2539         }
2540
2541     .method private static hidebysig 
2542            default bool ContentEquals<TKey,TValue> (valuetype Tests/Pair`2<!!TKey, !!TValue> v)  cil managed 
2543     {
2544         .maxstack 8
2545         IL_0000:  ldarga.s 0 
2546         IL_0006:  ldnull 
2547                           constrained. valuetype Tests/Pair`2<!!0,!!1>
2548         IL_0007:  callvirt instance bool class [mscorlib]System.Object::Equals(object)
2549                           ret
2550     }
2551
2552     .method public static hidebysig default int32 test_0_constrained_gshared_595863 () cil managed
2553     {
2554                 .locals init (
2555                 valuetype Tests/Pair`2<string, string>  V_0,
2556                 valuetype Tests/Pair`2<string, string>  V_1)
2557         IL_0000:  ldloca.s 0
2558         IL_0002:  initobj valuetype Tests/Pair`2<string,string>
2559         IL_0008:  ldloc.0 
2560         IL_0009:  stloc.1 
2561         IL_000a:  ldloca.s 1
2562         IL_000c:  ldstr "A"
2563         IL_0011:  stfld !0 valuetype Tests/Pair`2<string,string>::key
2564         IL_0016:  ldloca.s 1
2565         IL_0018:  ldstr "B"
2566         IL_001d:  stfld !1 valuetype Tests/Pair`2<string,string>::'value'
2567         IL_0022:  ldloc.1 
2568         IL_0023:  stloc.0 
2569         IL_0024:  ldloc.0 
2570         IL_0025:  call bool class Tests::ContentEquals<string, string> (valuetype Tests/Pair`2<!!0,!!1>)
2571                           brfalse SUCCESS
2572                           ldc.i4.1
2573                           ret
2574         SUCCESS:
2575                           ldc.i4.0
2576                           ret
2577     }
2578
2579         .method public static default int32 test_0_wrap_non_exception_throws () cil managed
2580         {
2581           .try {
2582                     newobj instance void class [mscorlib]System.Object::'.ctor'()
2583                         throw
2584                   leave IL_0
2585           } catch class [mscorlib]System.Runtime.CompilerServices.RuntimeWrappedException {
2586                   leave IL_0
2587                 }
2588                 IL_0:
2589                 ldc.i4.0
2590                 ret
2591     }
2592
2593         .method public static default int32 test_0_typespec_modopt () cil managed {
2594                 ldtoken class Tests modopt (Tests)
2595                 pop
2596                 ldc.i4.0
2597                 ret
2598         }
2599
2600         .method public hidebysig static int32 SizeOfT<T>() cil managed
2601         {
2602                 .maxstack  8
2603     
2604                 sizeof !!0
2605         ret
2606         }
2607
2608         .method public static default int32 test_1_sizeof_gshared () cil managed {
2609             call   int32 Tests::SizeOfT<int8>()
2610                 ldc.i4.1
2611                 ceq
2612                 ret
2613         }
2614
2615         .method public static default int32 test_1_sizeof_ref () cil managed {
2616             call   int32 Tests::SizeOfT<object>()
2617                 sizeof [mscorlib]System.IntPtr
2618                 ceq
2619                 ret
2620         }
2621
2622   .field static public int32 volatile_int
2623
2624         .method public static default int32 test_5_volatile_load_store () cil managed {
2625                 ldsflda int32 class Tests::volatile_int
2626                 ldc.i4 5
2627                 volatile.
2628                 stind.i4
2629                 ldsflda int32 class Tests::volatile_int
2630                 volatile.
2631                 ldind.i4
2632                 ret
2633         }               
2634
2635     .method public static 
2636            default int32 regress_693905_inner (int32 x, int32 acc)  cil managed 
2637     {
2638         // Method begins at RVA 0x2050
2639         // Code size 17 (0x11)
2640         .maxstack 5
2641         IL_0000:  ldarg.0 
2642         IL_0001:  brtrue.s IL_0005
2643
2644         IL_0003:  ldarg.1 
2645         IL_0004:  ret 
2646         IL_0005:  ldarg.0 
2647         IL_0006:  ldc.i4.1 
2648         IL_0007:  sub 
2649         IL_0008:  ldarg.1 
2650         IL_0009:  ldc.i4.1 
2651         IL_000a:  add 
2652         IL_000b:  starg.s 1
2653         IL_000d:  starg.s 0
2654         IL_000f:  br.s IL_0000
2655
2656     } // end of method Test::f
2657
2658     .method public static 
2659            default int32 test_10_regress_693905 ()  cil managed 
2660         {
2661                 ldc.i4.s 0x0a
2662         ldc.i4.0 
2663         call int32 class Tests::regress_693905_inner(int32, int32)
2664                 ret
2665         }
2666
2667         .method public static
2668                         default int32 test_0_llvm_regress_171 () cil managed
2669         {
2670                 .locals init (
2671                         int32 i
2672                 )
2673
2674                 call int32 Tests::return_1_noinline ()
2675                 ldc.i4.1
2676                 beq L1
2677                 ldc.i4.1
2678                 stloc.s 0
2679                 call int32 Tests::return_1_noinline ()
2680                 ldc.i4.0
2681                 beq L1
2682                 L1:
2683                 ldloc.s 0
2684                 ret
2685         }
2686
2687      .field  public static int32 static_a
2688
2689         .method public static
2690                         default int32 test_4_ldfld_stfld_static () cil managed
2691         {
2692                 ldnull
2693                 ldc.i4 2
2694                 stfld int32 Tests::static_a
2695                 ldnull
2696                 ldfld int32 Tests::static_a
2697                 ldnull
2698                 ldflda int32 Tests::static_a
2699                 ldind.i4
2700                 add
2701                 ret
2702         }
2703
2704   .method public static default int32 no_initlocals_inner () cil managed
2705   {
2706     .locals (
2707         int32 V_0,
2708         float32 V_1,
2709         float64 V_2,
2710         valuetype Tests/TailCallStruct V_3)
2711        ldloc V_0
2712        ret
2713   }
2714
2715   .method public static default int32 test_0_no_initlocals () cil managed
2716   {
2717        call int32 Tests::no_initlocals_inner()
2718        pop
2719            ldc.i4.0
2720        ret
2721   }
2722
2723   .method public hidebysig static int32  test_5_r4_fadd_mixed() cil managed
2724   {
2725     // Code size       17 (0x11)
2726     .maxstack  2
2727     .locals init (float32 V_0,
2728              float64 V_1)
2729     IL_0000:  ldc.r4     3
2730     IL_0005:  stloc.0
2731     IL_0006:  ldc.r8     2
2732     IL_000b:  stloc.1
2733     IL_000c:  ldloc.0
2734     IL_000d:  ldloc.1
2735     IL_000e:  add
2736     IL_000f:  conv.i4
2737     IL_0010:  ret
2738   }
2739
2740  .method public hidebysig static int32  test_0_fcmp_eq_r4_mixed() cil managed
2741   {
2742     // Code size       32 (0x20)
2743     .maxstack  2
2744     .locals init (float32 V_0,
2745              float64 V_1)
2746     IL_0000:  ldc.r4     1
2747     IL_0005:  stloc.0
2748     IL_0006:  ldc.r8     1
2749     IL_000f:  stloc.1
2750     IL_0010:  ldloc.0
2751     IL_0012:  ldloc.1
2752     IL_0013:  bne.un     IL_001e
2753
2754     IL_0018:  ldc.i4.0
2755     IL_0019:  br         IL_001f
2756
2757     IL_001e:  ldc.i4.1
2758     IL_001f:  ret
2759   } // end of method Tests::test_0_fcmp_eq_r4_mixed
2760
2761   .method public hidebysig static int32  test_0_fceq_r4_mixed() cil managed
2762   {
2763     // Code size       31 (0x1f)
2764     .maxstack  2
2765     .locals init (float32 V_0,
2766              float64 V_1,
2767              bool V_2)
2768     IL_0000:  ldc.r4     1
2769     IL_0005:  stloc.0
2770     IL_0006:  ldc.r8     1
2771     IL_000b:  stloc.1
2772     IL_000c:  ldloc.0
2773     IL_000d:  ldloc.1
2774     IL_000e:  ceq
2775     IL_0010:  stloc.2
2776     IL_0011:  ldloc.2
2777     IL_0012:  brfalse    IL_001d
2778
2779     IL_0017:  ldc.i4.0
2780     IL_0018:  br         IL_001e
2781
2782     IL_001d:  ldc.i4.1
2783     IL_001e:  ret
2784   } // end of method Tests::test_0_fceq_r4
2785
2786   .method public static int32 test_0_switch_loop () cil managed
2787   {
2788         .maxstack 16
2789         .locals init (valuetype Tests/TailCallStruct V_0, int32 V_1)
2790         ldc.i4.0
2791         ldloc.0
2792         ldloc.1
2793         brtrue L_1
2794         L_0:
2795         ldc.i4.4
2796         switch (L_0)
2797         L_1:
2798         pop
2799         ret
2800   }
2801 }