Merge pull request #820 from brendanzagaeski/master
[mono.git] / mono / mini / iltests.il.in
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                 .maxstack 16
1230                 .locals init (
1231                         int32 res
1232                 )
1233
1234                 .try { // 0
1235                         .try {
1236                                 ldstr "OnErrorSub test Exception"
1237                                 newobj instance void class [mscorlib]System.Exception::.ctor(string)
1238                                 throw 
1239                                 leave.s IL_0033
1240                         }
1241                         filter {
1242                                 pop
1243                                 ldc.i4.0
1244                                 endfilter
1245                         } {
1246                                 pop
1247                                 // Should not be called
1248                                 ldc.i4.2
1249                                 stloc res
1250                                 leave.s IL_0033
1251                         }
1252                 }
1253                 filter {
1254                         pop
1255                         ldc.i4.1
1256                         endfilter 
1257                 } {
1258                   pop
1259                   ldc.i4.1
1260                   stloc res       
1261                   leave.s IL_0033
1262
1263                 }
1264                 IL_0033:
1265                 ldloc res
1266                 ret
1267         }
1268
1269         .class nested private auto ansi sealed beforefieldinit TheStruct
1270                 extends [mscorlib]System.ValueType {
1271                 .field public int32 a
1272                 .field public int32 b
1273         }
1274
1275         .method public static int32 test_5_cpobj () {
1276                 .maxstack 8
1277                 .locals init (  
1278                                 valuetype Tests/TheStruct v_0, 
1279                                 valuetype Tests/TheStruct v_1
1280                                          )
1281
1282                 ldloca v_0
1283                 ldc.i4.2
1284                 stfld int32 Tests/TheStruct::a
1285
1286                 ldloca v_0
1287                 ldc.i4.3
1288                 stfld int32 Tests/TheStruct::b
1289
1290                 ldloca v_1
1291                 ldloca v_0
1292                 cpobj Tests/TheStruct
1293
1294                 ldloca v_1
1295                 ldfld int32 Tests/TheStruct::a
1296                 ldloca v_1
1297                 ldfld int32 Tests/TheStruct::b
1298                 add
1299
1300                 ret
1301         }
1302
1303         .method public static int32 test_5_ldobj_stloc_optimization () {
1304                 .maxstack 8
1305                 .locals init (  
1306                                 valuetype Tests/TheStruct v_0, 
1307                                 valuetype Tests/TheStruct v_1
1308                                          )
1309
1310                 ldloca v_0
1311                 ldc.i4.2
1312                 stfld int32 Tests/TheStruct::a
1313
1314                 ldloca v_0
1315                 ldc.i4.3
1316                 stfld int32 Tests/TheStruct::b
1317
1318                 ldloca v_0
1319                 ldobj valuetype Tests/TheStruct
1320                 stloc.s v_1
1321
1322                 ldloca v_1
1323                 ldfld int32 Tests/TheStruct::a
1324                 ldloca v_1
1325                 ldfld int32 Tests/TheStruct::b
1326                 add
1327
1328                 ret
1329         }
1330
1331         .method public static int32 test_1_cpobj_reference () {
1332                 .maxstack 8
1333                 .locals init (  
1334                                 object v_0, 
1335                                 object v_1
1336                                          )
1337
1338                 newobj instance void object::.ctor()
1339                 stloc v_0
1340
1341                 ldloca v_1
1342                 ldloca v_0
1343                 cpobj object
1344
1345                 ldloc v_0
1346                 ldloc v_1
1347                 ceq
1348                 ret
1349         }
1350
1351         .method public static int32 test_1_initobj_reference () {
1352                 .maxstack 8
1353                 .locals init (  
1354                                 object v_0
1355                                          )
1356
1357                 newobj instance void object::.ctor()
1358                 stloc v_0
1359
1360                 ldloca v_0
1361                 initobj object
1362
1363                 ldloc v_0
1364                 ldnull
1365                 ceq
1366                 ret
1367         }
1368
1369         .method public static int32 test_1_ldobj_reference () {
1370                 .maxstack 8
1371                 .locals init (  
1372                                 object v_0
1373                                          )
1374
1375                 newobj instance void object::.ctor()
1376                 stloc v_0
1377
1378                 ldloc v_0
1379                 ldloca v_0
1380                 ldobj object
1381                 ceq
1382                 ret
1383         }
1384
1385         .method public static int32 test_5_vtype_on_bb_boundary () {
1386                 .maxstack 8
1387                 .locals init (  
1388                                 valuetype Tests/TheStruct v_0, 
1389                                 valuetype Tests/TheStruct v_1
1390                                          )
1391
1392                 ldloca v_0
1393                 ldc.i4.2
1394                 stfld int32 Tests/TheStruct::a
1395
1396                 ldloca v_0
1397                 ldc.i4.3
1398                 stfld int32 Tests/TheStruct::b
1399
1400                 ldloc v_0
1401                 br L_0
1402         L_0: stloc v_1
1403
1404                 ldloca v_1
1405                 ldfld int32 Tests/TheStruct::a
1406                 ldloca v_1
1407                 ldfld int32 Tests/TheStruct::b
1408                 add
1409                 ret
1410         }
1411
1412         .method public static int32 test_5_different_in_stacks () cil managed {
1413                 .maxstack 16
1414
1415                         ldc.i4.1
1416                         ldc.i4.1
1417                         beq L_0
1418
1419                         ldc.i4.3
1420                         ldc.i4.3
1421                         br L_1
1422                         ldc.i4.3
1423                         ldc.i4.3
1424                         br L_2
1425          L_0:   ldc.i4.2
1426                         ldc.i4.3
1427                         ldc.i4.1
1428                         ldc.i4.1
1429                         beq L_2
1430          L_1:   add
1431                         ret
1432          L_2:   add
1433                         ret
1434         }
1435
1436         .method public static int32 test_3_larray_get_set () {
1437                 .locals init (
1438                         int32[2]        V_0)
1439                           
1440                         ldc.i4.2 
1441                         newobj instance void int32[0...]::.ctor(int32)
1442                         stloc.0 
1443                         ldloc.0 
1444                         ldc.i4.0 
1445                         ldc.i4 1
1446                         call instance void int32[0...]::Set(int32, int32)
1447                     ldloc.0 
1448                     ldc.i4.1 
1449                         ldc.i4 2
1450                         call instance void int32[0...]::Set(int32, int32)
1451
1452                         ldloc.0
1453                         ldc.i4.0
1454                         call instance int32 int32[0...]::Get(int32)
1455                         ldloc.0
1456                         ldc.i4.1
1457                         call instance int32 int32[0...]::Get(int32)
1458                         add
1459                         ret
1460         }
1461
1462         .method public static int32 test_0_pop_side_effects () {
1463                 .try {
1464                         ldc.r8 1
1465                         ldc.r8 0
1466                         div
1467                         ckfinite
1468                         pop
1469                         leave FAIL
1470                 }
1471                 catch [mscorlib]System.ArithmeticException {
1472                         pop
1473                         leave L_0
1474                 }
1475                 L_0:
1476                 ldc.i4.0
1477                 ret
1478                 FAIL:
1479                 ldc.i4.1
1480                 ret
1481         }
1482
1483         .method public static void regalloc_regress_78314_helper (object o) cil managed
1484         {
1485                 ret
1486         }
1487
1488         .method public static int32 test_1_regalloc_regress_78314 () cil managed
1489         {
1490     // Code size       68 (0x44)
1491     .maxstack  6
1492     .locals init (int32 V_0, bool V_1)
1493     IL_0000:  ldc.i4.0
1494     IL_0001:  stloc.0
1495     IL_0002:  br.s       IL_003b
1496
1497     IL_0004:
1498     IL_001e:  ldc.i4.s   10
1499     IL_0020:  ldloc.0
1500     IL_0021:  shl
1501     IL_0022:  ldc.i4.s   10
1502     IL_0024:  ldloc.0
1503     IL_0025:  shl
1504     IL_0026:  ceq
1505     IL_0028:  box        [mscorlib]System.Boolean
1506     IL_0032:  call       void Tests::regalloc_regress_78314_helper(object)
1507     IL_0037:  ldloc.0
1508     IL_0038:  ldc.i4.1
1509     IL_0039:  add
1510     IL_003a:  stloc.0
1511     IL_003b:  ldloc.0
1512     IL_003c:  ldc.i4.8
1513     IL_003f:  blt.s      IL_0004
1514
1515         ldloc.0
1516         ldc.i4.8
1517         ceq
1518         conv.i4
1519         ret     
1520   }
1521
1522         .method public static void try_block_end_remove_if_useless () cil managed {
1523             .maxstack  8
1524
1525             T_START:
1526                 ldstr   "Start"
1527                         pop
1528                 leave.s COMPLETE
1529             T1_END:
1530
1531             COMPLETE:
1532                 ret
1533
1534             F1_START:
1535                 ldstr   "Finally1"
1536                         pop
1537                 endfinally
1538             F1_END:
1539
1540             .try T_START to T1_END finally handler F1_START to F1_END
1541         }
1542
1543         .method public static int32 test_0_try_block_end_remove_if_useless () cil managed {
1544                 call void class Tests::try_block_end_remove_if_useless ()
1545                 ldc.i4.0
1546                 ret
1547         }
1548
1549    .method private static int32 test_0_regress_78629_switch_next_ins_target ()  cil managed
1550     {
1551         ldc.i4.0
1552         switch (target)
1553         target: ldstr "bar"
1554                 pop
1555                 ldc.i4.0
1556         ret
1557     }
1558
1559         // This belongs to basic-float.cs, but its hard to tell mcs/csc to
1560         // generate the non .un version of the opcodes
1561     .method private static  hidebysig 
1562            default int32 test_4_float_branch_nan ()  cil managed 
1563     {
1564         // Method begins at RVA 0x27a4
1565         // Code size 74 (0x4a)
1566         .maxstack 2
1567         .locals init (
1568                 float64 V_0,
1569                 float64 V_1,
1570                 int32   V_2)
1571         IL_0000:  ldc.r8 (00 00 00 00 00 00 f8 ff)
1572         IL_0009:  stloc.0 
1573         IL_000a:  ldc.r8 1.
1574         IL_0013:  stloc.1 
1575         IL_0014:  ldc.i4.0 
1576         IL_0015:  stloc.2 
1577         IL_0016:  ldloc.0 
1578         IL_0017:  ldloc.1 
1579         IL_0018:  bge.s IL_001a
1580
1581                                 br L1
1582         IL_001a:  ldloc.2 
1583         IL_001b:  ret 
1584         L1:
1585         IL_001c:  ldloc.2 
1586         IL_001d:  ldc.i4.1 
1587         IL_001e:  add 
1588         IL_001f:  stloc.2 
1589         IL_0020:  ldloc.0 
1590         IL_0021:  ldloc.1 
1591         IL_0022:  ble.s IL_002e
1592                                 br L2
1593         IL_002e:  ldloc.2 
1594         IL_002f:  ret 
1595         L2:
1596         IL_0030:  ldloc.2 
1597         IL_0031:  ldc.i4.1 
1598         IL_0032:  add 
1599         IL_0033:  stloc.2 
1600         IL_0034:  ldloc.0 
1601         IL_0035:  ldloc.1 
1602         IL_0036:  blt.s IL_0038
1603                                 br L3           
1604         IL_0038:  ldloc.2 
1605         IL_0039:  ret 
1606         L3:
1607         IL_003a:  ldloc.2 
1608         IL_003b:  ldc.i4.1 
1609         IL_003c:  add 
1610         IL_003d:  stloc.2 
1611         IL_003e:  ldloc.0 
1612         IL_003f:  ldloc.1 
1613         IL_0040:  bgt.s IL_0042
1614                                 br L4
1615         IL_0042:  ldloc.2 
1616         IL_0043:  ret 
1617         L4:
1618         IL_0044:  ldloc.2 
1619         IL_0045:  ldc.i4.1 
1620         IL_0046:  add 
1621         IL_0047:  stloc.2 
1622         IL_0048:  ldloc.2 
1623         IL_0049:  ret 
1624     } // end of method Tests::test_5_float_branch_nan
1625
1626     .method private static  hidebysig
1627            default void regress_80622_inner (object x)  cil managed
1628     {
1629                 .locals (unsigned int8 i)
1630         // Method begins at RVA 0x2050
1631         // Code size 14 (0xe)
1632         .maxstack 8
1633         IL_1000:  ldarg.0
1634         IL_1001:  unbox unsigned int8
1635         IL_1006:  ldobj unsigned int8
1636         IL_000b:  conv.ovf.i4.un
1637         IL_000c:  pop
1638         IL_000d:  ret
1639     }
1640
1641     // method line 2
1642     .method private static  hidebysig
1643            default int32 test_0_regress_80622 ()  cil managed
1644     {
1645         .maxstack 8
1646         IL_0000:  ldc.i4 255
1647         IL_0005:  box unsigned int8
1648         IL_000a:  call void class Tests::regress_80622_inner (object)
1649                 ldc.i4.0
1650         IL_000f:  ret
1651     }
1652
1653         .method private static default int32 test_0_regresss_80190 () cil managed
1654         {
1655             .maxstack  2
1656             .locals init (int32 V_0,
1657                      int32* V_1)
1658             IL_0000:  nop
1659             IL_0001:  nop
1660             IL_0002:  ldloca.s   V_0
1661             IL_0004:  conv.u
1662             IL_0005:  stloc.1
1663             IL_0006:  ldloc.1
1664             IL_0007:  ldc.i4.3
1665             IL_0008:  stind.i4
1666             IL_0009:  nop
1667                                   ldc.i4.0
1668                                   ret
1669         }
1670
1671         .class interface nested public auto ansi abstract IFaceWithStaticMethod
1672         {
1673             .method public static  specialname 
1674                default void foo ()  cil managed noinlining 
1675             {
1676                 .maxstack 0
1677                 IL_0000:  ret 
1678         }
1679         }
1680         
1681         .class nested public auto ansi AClass extends [mscorlib]System.Object implements Tests/IFaceWithStaticMethod
1682         {
1683             .method public hidebysig  specialname  rtspecialname 
1684            instance default void .ctor ()  cil managed 
1685             {
1686                         .maxstack 8
1687                         ret
1688                 }
1689
1690         }
1691
1692         // Test that static methods in interfaces are ignored during vtable construction
1693         .method private static default int32 test_0_ifaces_with_static_methods () cil managed
1694         {
1695                 .maxstack 16
1696
1697                 newobj instance void class Tests/AClass::.ctor()
1698                 pop
1699                 ldc.i4.0
1700                 ret
1701         }
1702
1703         .method private static hidebysig default int32 Foo<T> (!!T n)  cil managed {
1704                 ldarg.0
1705                 box !!0
1706                 brtrue HAS_VALUE
1707                 ldc.i4.0
1708                 ret
1709 HAS_VALUE:      ldc.i4.1
1710                 ret
1711         }
1712
1713         // bug 78019
1714         .method static public int32 test_0_nullable_box_brtrue () cil managed {
1715
1716                 .locals init (valuetype [mscorlib]System.Nullable`1<int32> V_0)
1717
1718                 ldloc.0
1719                 call int32 class Tests::Foo<valuetype [mscorlib]System.Nullable`1<int32>> (!!0)
1720                 ret
1721         }
1722
1723         //Bug 372410
1724         .method static public int32 test_0_ldelema_type_check () cil managed {
1725                 .maxstack 16
1726                 .locals init (object[] V_0,
1727                                           object[,] V_1)
1728
1729                 ldc.i4.1
1730                 newarr object
1731                 stloc.0
1732
1733                 .try {
1734                         ldloc.0
1735                         ldc.i4.0
1736                         ldelema object
1737                         leave L1
1738                 } catch [mscorlib]System.ArrayTypeMismatchException {
1739                         leave ERROR1
1740                 }
1741
1742         L1:
1743                 ldc.i4.1
1744                 newarr string
1745                 stloc.0
1746
1747                 .try {
1748                         ldloc.0
1749                         ldc.i4.0
1750                         ldelema object
1751                         leave ERROR2
1752                 } catch [mscorlib]System.ArrayTypeMismatchException {
1753                         leave L2
1754                 }
1755
1756         L2:
1757                         ldc.i4.1
1758                 newarr string
1759                 stloc.0
1760
1761                 .try {
1762                         ldloc.0
1763                         ldc.i4.0
1764                         readonly. ldelema object
1765                         leave L3
1766                 } catch [mscorlib]System.ArrayTypeMismatchException {
1767                         leave ERROR3
1768                 }
1769
1770         L3:
1771                 ldc.i4.0
1772                 ret
1773
1774
1775         ERROR1:
1776                 ldc.i4.1
1777                 ret
1778
1779         ERROR2:
1780                 ldc.i4.2
1781                 ret
1782
1783         ERROR3:
1784                 ldc.i4.3
1785                 ret
1786         }
1787
1788
1789         //Bug 372410
1790         .method static public int32 test_0_array_address_type_check () cil managed {
1791                 .maxstack 16
1792                 .locals init (object[] V_0,
1793                                           object[,] V_1)
1794
1795                 ldc.i4.1 
1796             ldc.i4.1 
1797             newobj instance void object[,]::.ctor(int32, int32)
1798                 stloc.1
1799
1800                 .try {
1801                         ldloc.1
1802                         ldc.i4.0
1803                         ldc.i4.0
1804                         call instance object&  object[,]::Address(int32, int32)
1805                         leave L4
1806                 } catch [mscorlib]System.ArrayTypeMismatchException {
1807                         leave ERROR4
1808                 }
1809
1810         L4:
1811                 ldc.i4.1 
1812             ldc.i4.1 
1813             newobj instance void string[,]::.ctor(int32, int32)
1814                 stloc.1
1815
1816                 .try {
1817                         ldloc.1
1818                         ldc.i4.0
1819                         ldc.i4.0
1820                         call instance object&  object[,]::Address(int32, int32)
1821                         leave ERROR5
1822                 } catch [mscorlib]System.ArrayTypeMismatchException {
1823                         leave L5
1824                 }
1825
1826         L5:
1827                 ldc.i4.1 
1828             ldc.i4.1 
1829             newobj instance void string[,]::.ctor(int32, int32)
1830                 stloc.1
1831
1832                 .try {
1833                         ldloc.1
1834                         ldc.i4.0
1835                         ldc.i4.0
1836                         readonly. call instance object&  object[,]::Address(int32, int32)
1837                         leave L6
1838                 } catch [mscorlib]System.ArrayTypeMismatchException {
1839                         leave ERROR6
1840                 }
1841
1842         L6:
1843                 ldc.i4.0
1844                 ret
1845         ERROR4:
1846                 ldc.i4.4
1847                 ret
1848
1849         ERROR5:
1850                 ldc.i4.5
1851                 ret
1852
1853         ERROR6:
1854                 ldc.i4.6
1855                 ret
1856         }
1857
1858         .field public  static unsigned int64 'ull'
1859
1860         .field public  static int32 'shift2'
1861
1862         .method public static int32 test_0_long_shift_regalloc () cil managed
1863         {
1864                 .locals (unsigned int32 'cilsimp.28', unsigned int64 'cilsimp.27', int32 'cilsimp.26')
1865
1866                 .maxstack 4
1867
1868                 ldc.i8  81985529234382576
1869                 stsfld  unsigned int64 Tests::ull
1870             ldc.i4      60
1871                 stsfld  int32 Tests::shift2
1872
1873                 ldsfld  unsigned int64 Tests::ull
1874                 stloc   'cilsimp.27'
1875                 ldsfld  int32 Tests::shift2
1876                 stloc   'cilsimp.28'
1877                 ldloc   'cilsimp.27'
1878                 ldloc   'cilsimp.28'
1879                 shr.un
1880                 ldloc   'cilsimp.27'
1881                 ldc.i4  64
1882                 ldloc   'cilsimp.28'
1883                 sub
1884                 shl
1885                 or
1886                 ldc.i8  1311768467750121216
1887                 ceq
1888                 ldc.i4.1
1889                 xor
1890                 conv.u4
1891                 ret
1892         }
1893
1894         // Test calling ldfld directly on a vtype instead of a vtype address
1895         .method public static int32 test_5_call_ldfld_vtype () cil managed
1896         {
1897                 .maxstack 16
1898                 .locals init (
1899                         valuetype Tests/TailCallStruct arg
1900                 )
1901                 ldloca 0
1902                 ldc.i4.2
1903                 stfld int32 Tests/TailCallStruct::a
1904                 ldloca 0
1905                 ldc.i4.4
1906                 stfld int32 Tests/TailCallStruct::b
1907                 ldloc.0
1908                 call valuetype Tests/TailCallStruct Tests::tail2 (valuetype Tests/TailCallStruct)
1909                 ldfld int32 Tests/TailCallStruct::a
1910                 ret
1911         }
1912
1913         .method public static int32 throw_ret () cil managed
1914         {
1915                 ldstr "FOO"
1916                 newobj instance void class [mscorlib]System.OverflowException::.ctor(string)
1917                 throw
1918                 ldc.i4.4
1919                 ret
1920         }
1921
1922         .method public static int32 throw2_ret () cil managed
1923         {
1924                 // Disable inlining
1925                 ldc.i4.5
1926                 localloc
1927                 pop
1928
1929                 call int32 Tests::throw_ret ()
1930                 ret
1931         }
1932
1933         // Test inlining a method which contains just a throw
1934         .method public static int32 test_0_inline_throw () cil managed
1935         {
1936                 .maxstack 16
1937                 .locals init (
1938                                 int32 v_0
1939                 )
1940
1941                 .try {
1942                         call int32 Tests::throw2_ret ()
1943                         stloc.0
1944                         leave L0
1945                 } catch [mscorlib]System.OverflowException {
1946                         pop
1947                         leave L1
1948                 }
1949
1950                 L0:
1951                         ldc.i4.1
1952                         ret
1953                 L1:
1954                         ldc.i4.0
1955                         ret                     
1956         }
1957
1958     .method public static int32 test_0_stelem_any_null_opt () cil managed
1959     {
1960                 .maxstack 16
1961                 .locals init (
1962                                 object[]        V_0,
1963                                 int32   V_1)
1964
1965                 ldc.i4.s 10
1966                 newarr [mscorlib]System.Object
1967                 stloc.0
1968
1969                 ldc.i4.0
1970                 stloc.1
1971                 br L0
1972
1973         L1:
1974                 ldloc.0
1975                 ldloc.1
1976                 ldnull
1977                 stelem.any [mscorlib]System.Object
1978                 ldloc.1
1979                 ldc.i4.1
1980                 add
1981                 stloc.1
1982         L0:
1983                 ldloc.1
1984                 ldc.i4.s 10
1985                 blt L1
1986
1987                 ldc.i4.0
1988                 ret
1989         }
1990
1991     // method line 2
1992     .method public static  hidebysig 
1993            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 
1994     {
1995         // Method begins at RVA 0x20f4
1996         // Code size 44 (0x2c)
1997         .maxstack 8
1998         IL_0000:  ldarg.0 
1999         IL_0001:  ldarg.1 
2000         IL_0002:  add 
2001         IL_0003:  ldarg.2 
2002         IL_0004:  add 
2003         IL_0005:  ldarg.3 
2004         IL_0006:  add 
2005         IL_0007:  ldarg.s 4
2006         IL_0009:  add 
2007         IL_000a:  ldarg.s 5
2008         IL_000c:  add 
2009         IL_000d:  ldarg.s 6
2010         IL_000f:  add 
2011         IL_0010:  ldarg.s 7
2012         IL_0012:  add 
2013         IL_0013:  ldarg.s 8
2014         IL_0015:  add 
2015         IL_0016:  ldarg.s 9
2016         IL_0018:  add 
2017         IL_0019:  ldarg.s 10
2018         IL_001b:  add 
2019         IL_001c:  ldarg.s 11
2020         IL_001e:  add 
2021         IL_001f:  ldarg.s 12
2022         IL_0021:  add 
2023         IL_0022:  ldarg.s 13
2024         IL_0024:  add 
2025         IL_0025:  ldarg.s 14
2026         IL_0027:  add 
2027         IL_0028:  ldarg.s 15
2028         IL_002a:  add 
2029         IL_002b:  ret 
2030     } // end of method main::callee
2031
2032     // method line 3
2033     .method public static  hidebysig 
2034            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 
2035     {
2036         // Method begins at RVA 0x2124
2037         // Code size 34 (0x22)
2038         .maxstack 17
2039         IL_0000:  ldarg.0 
2040         IL_0001:  ldarg.1 
2041         IL_0002:  ldarg.2 
2042         IL_0003:  ldarg.3 
2043         IL_0004:  ldarg.s 4
2044         IL_0006:  ldarg.s 5
2045         IL_0008:  ldarg.s 6
2046         IL_000a:  ldarg.s 7
2047         IL_000c:  ldarg.s 8
2048         IL_000e:  ldarg.s 9
2049         IL_0010:  ldarg.s 10
2050         IL_0012:  ldarg.s 11
2051         IL_0014:  ldarg.s 12
2052         IL_0016:  ldarg.s 13
2053         IL_0018:  ldarg.s 14
2054         IL_001a:  ldarg.s 15
2055                   tail.
2056         IL_001c:  call int32 class Tests::manyargs_callee(int32, int32, int32, int32, int32, int32, int32, int32, int32, int32, int32, int32, int32, int32, int32, int32)
2057         IL_0021:  ret 
2058     } // end of method main::caller
2059
2060     // method line 4
2061     .method public static  hidebysig 
2062            default int32 test_0_many_args_tail_call ()  cil managed 
2063     {
2064                 // Some platforms might not be able to AOT tail calls
2065                 .custom instance void class [TestDriver]CategoryAttribute::'.ctor'(string) =  (01 00 08 21 46 55 4C 4C 41 4F 54 00 00 ) // ...!FULLAOT..
2066
2067         // Method begins at RVA 0x2154
2068         // Code size 43 (0x2b)
2069         .maxstack 17
2070         IL_0000:  ldc.i4.1 
2071         IL_0001:  ldc.i4.2 
2072         IL_0002:  ldc.i4.3 
2073         IL_0003:  ldc.i4.4 
2074         IL_0004:  ldc.i4.5 
2075         IL_0005:  ldc.i4.6 
2076         IL_0006:  ldc.i4.7 
2077         IL_0007:  ldc.i4.8 
2078         IL_0008:  ldc.i4.s 0x09
2079         IL_000a:  ldc.i4.s 0x0a
2080         IL_000c:  ldc.i4.s 0x0b
2081         IL_000e:  ldc.i4.s 0x0c
2082         IL_0010:  ldc.i4.s 0x0d
2083         IL_0012:  ldc.i4.s 0x0e
2084         IL_0014:  ldc.i4.s 0x0f
2085         IL_0016:  ldc.i4.s 0x10
2086         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)
2087         IL_001d:  ldc.i4 136
2088         IL_0022:  beq IL_0029
2089
2090         IL_0027:  ldc.i4.1 
2091         IL_0028:  ret 
2092         IL_0029:  ldc.i4.0 
2093         IL_002a:  ret 
2094     } // end of method main::Main
2095
2096         .class nested private auto ansi beforefieldinit R1
2097            extends [mscorlib]System.MarshalByRefObject
2098         {
2099                 .field  public  int32 test_field
2100
2101         .method public hidebysig  specialname  rtspecialname
2102                         instance default void '.ctor' ()  cil managed
2103         {
2104                         ret
2105                 }
2106         }
2107
2108         .method public static hidebysig
2109                         default int32 return_0 () cil managed
2110         {
2111                 ldc.i4.0
2112                 ret
2113         }
2114
2115         .method public static hidebysig
2116                         default int32 test_1_volatile_marshalbyref_bug_432673 () cil managed
2117         {
2118                 .locals init (
2119                         class Tests/R1 v_0
2120                 )
2121
2122                 newobj instance void class Tests/R1::.ctor ()
2123                 stloc.0
2124                 ldloc.0
2125                 ldc.i4.0
2126                 volatile.
2127                 stfld int32 Tests/R1::test_field
2128                 call int32 class Tests::return_0 ()
2129                 ldc.i4.1
2130                 add
2131                 ret
2132         }
2133
2134         .method public static default int32 return_2 () cil managed
2135         {
2136                 // Prevent inlining
2137                 ldc.i4.s 16
2138         localloc
2139                 pop
2140                 ldc.i4.s 2
2141                 ret
2142         }
2143
2144         .method public static hidebysig
2145                         default int32 test_1_cmov_opt_regress_463357 () cil managed
2146         {
2147                 call int32 class Tests::return_2 ()
2148                 ldc.i4.0
2149                 ceq
2150                 brfalse L1
2151                 ldc.i4.0
2152                 ret
2153                 br L2
2154         L1: nop
2155         L2: nop
2156                 ldc.i4.1
2157                 ret
2158         }
2159
2160    .method public static hidebysig default int32 cmov_opt_regress_474718_inner (int32 A_1)  cil managed 
2161    {
2162       .maxstack 3
2163       .locals init (int32 V_0, bool V_1, bool V_2)
2164       
2165           ldc.i4.0
2166       IL_000b:  stloc.1 
2167       IL_000d:  br IL_002f
2168
2169           ldc.i4.1    
2170           stloc.2
2171       IL_001e:  ldloc.2 
2172       IL_001f:  brfalse IL_0036
2173
2174       IL_0024:  
2175       IL_002a:  br IL_0041
2176     
2177       IL_002f:  ldloc.1
2178       IL_0030:  stloc.2 
2179       IL_0031:  br IL_001e
2180     
2181       IL_0036:  ldc.i4 0
2182       IL_003b:  stloc.0 
2183       IL_003c:  br IL_0041
2184     
2185       IL_0041:  ldloc.0 
2186       IL_0042:  ret 
2187   } 
2188
2189     .method public static default int32 test_0_cmov_opt_regress_474718 ()  cil managed 
2190     {
2191         .maxstack 16
2192         ldc.i4.1
2193         call int32 Tests::cmov_opt_regress_474718_inner (int32)
2194         ret
2195    }
2196
2197         .method public static default int32 test_5_createarr_newobj () cil managed
2198         {
2199                 .maxstack 16
2200
2201                 ldc.i4 5
2202                 newobj void char[]::.ctor(int32)
2203                 ldlen
2204                 ret
2205         }
2206
2207         .method public static default int32 test_0_initblk_3_regress_481458 () cil managed
2208         {
2209                 .maxstack 16
2210                 .locals init (native int)
2211
2212                 ldc.i4.s 10
2213                 localloc
2214                 stloc.0
2215
2216                 // Set the first value to 3
2217                 ldloc.0
2218                 ldc.i4.0
2219                 add             //addr
2220                 ldc.i4.3        //value
2221                 stind.i1
2222
2223                 // Zero out the first 3 values
2224                 ldloc.0         //addr
2225                 ldc.i4.0        //value
2226                 ldc.i4.s 3      //size
2227                 initblk
2228
2229                 // Load the first value
2230                 ldloc.0
2231                 ldc.i4.0
2232                 add     
2233                 ldind.u1
2234                 conv.i4
2235                 ret
2236         }
2237
2238         .method public static float32 GetFloat32() cil managed noinlining
2239         {
2240                 .maxstack  8
2241                 ldc.r8     0.19975845134874831
2242                 ret
2243         }
2244
2245 /*         Disabled until they can be fixed to run on amd64
2246         .method public static default int32 test_0_implicit_float_to_double_conversion () cil managed
2247         {
2248                 .maxstack 16
2249
2250                 call float32 Tests::GetFloat32()
2251                 ldc.r8     0.19975845134874831
2252                 beq OK
2253
2254                 ldc.i4.1
2255                 ret
2256 OK:
2257                 ldc.i4.0
2258                 ret
2259         }
2260 */
2261
2262         .method public static default int32 test_0_long_to_r8_un_overflow () cil managed
2263         {
2264                 .maxstack 16
2265                 ldc.i8     0x00FFFFFFFFFFFFFF
2266                 conv.r.un
2267                 conv.i8
2268                 ldc.i8 0x100000000000000
2269                 beq OK_1
2270
2271                 ldc.i4.1
2272                 ret
2273 OK_1:
2274                 ldc.i8     0x00FFFFFFFFFFFFFF
2275                 conv.r.un
2276                 conv.r8
2277                 conv.i8
2278                 ldc.i8 0x100000000000000
2279                 beq OK_2
2280
2281                 ldc.i4.2
2282                 ret
2283 OK_2:
2284                 ldc.i4.0
2285                 ret
2286         }
2287
2288         .field public static int32 shift1
2289
2290         .method public static int32 regress_497271_helper (int32 i) cil managed
2291         {
2292                 ldarg.0
2293                 ret
2294         }
2295
2296         .method public static int32 test_0_regalloc_regress_497271 () cil managed
2297         {
2298                 .locals (int32 var)
2299
2300                 ldc.i4  4
2301                 stsfld  int32 Tests::shift1
2302                 ldsfld  int32 Tests::shift1
2303                 stloc   var
2304                 ldc.i4  4660
2305                 ldloc   var
2306                 shr.un
2307                 ldc.i4  4660
2308                 ldc.i4  32
2309                 ldloc   var
2310                 sub
2311                 shl
2312                 or
2313                 ldc.i4  1073742115
2314                 beq     ?L10
2315 ?L9:
2316                 ldc.i4  1
2317                 call    int32 Tests::regress_497271_helper (int32)
2318                 ret
2319 ?L10:
2320                 ldc.i4  0
2321                 call    int32 Tests::regress_497271_helper (int32)
2322                 ret
2323         }
2324
2325    .field  private static  int32 Value
2326
2327   .method public static hidebysig  specialname 
2328           default int32 regress_513931_inner ()  cil managed 
2329     {                                                                 
2330         // Method begins at RVA 0x225c                                
2331         // Code size 52 (0x34)                                        
2332         .maxstack 2                                                   
2333         .locals init (                                                
2334                 int32   V_0,                                          
2335                 int32   V_1,                                          
2336                 bool    V_2)
2337                        
2338                                 ldc.i4 999
2339                                 stsfld int32 Tests::Value
2340
2341         IL_0000:  nop                                                 
2342         IL_0001:  ldsfld int32 Tests::Value      
2343         IL_0006:  stloc.0                                             
2344         IL_0007:  ldloc.0                                             
2345         IL_0008:  ldc.i4.0                                            
2346         IL_0009:  cgt                                                 
2347         IL_000b:  ldc.i4.0                                            
2348         IL_000c:  ceq                                                 
2349         IL_000e:  stloc.2                                             
2350         IL_000f:  ldloc.2                                             
2351         IL_0010:  brtrue.s IL_0027                                    
2352
2353         IL_0012:  nop 
2354         IL_0013:  ldloc.0 
2355         IL_0014:  ldc.i4.s 0x7b
2356         IL_0016:  ceq          
2357         IL_0018:  ldc.i4.0     
2358         IL_0019:  ceq          
2359         IL_001b:  stloc.2      
2360         IL_001c:  ldloc.2      
2361         IL_001d:  brtrue.s IL_0023
2362
2363         IL_001f:  ldc.i4.m1 
2364         IL_0020:  stloc.1   
2365         IL_0021:  br.s IL_0032
2366
2367         IL_0023:  ldc.i4.1 
2368         IL_0024:  stloc.1  
2369         IL_0025:  br.s IL_0032
2370
2371         IL_0027:  
2372         IL_002c:  newobj instance void class [mscorlib]System.Exception::'.ctor'()
2373         IL_0031:  throw                                                                            
2374         IL_0032:  ldloc.1                                                                          
2375         IL_0033:  ret                                                                              
2376     }
2377
2378         .method public static hidebysig  specialname 
2379          default int32 test_0_regress_513931 ()  cil managed 
2380         {
2381                 call int32 Tests::regress_513931_inner ()
2382                 pop
2383                 ldc.i4.0
2384                 ret
2385         }
2386
2387         .method public static default int32 test_0_newarr_i8 () cil managed
2388         {
2389                 ldc.i4 1000
2390                 conv.i8
2391                 newarr [mscorlib]System.Boolean
2392                 pop
2393                 ldc.i4 0
2394                 ret
2395         }
2396
2397         .method public static specialname 
2398                default int32 return_1_noinline ()  cil managed noinlining 
2399         {
2400                 .maxstack 0
2401
2402                 ldc.i4.1
2403                 ret 
2404         }
2405
2406         // Only happens with -O=-deadce,cmov
2407         .method public static default int32 test_0_cmov_unused_582322 () cil managed
2408         {
2409         .maxstack 2                                                   
2410         .locals init (                                                
2411                                 int32 V_0
2412                 )                               
2413                 call int32 Tests::return_1_noinline ()
2414                 ldc.i4.1
2415                 bne.un L0
2416                 ldloc.s 0
2417                 pop
2418         L0:
2419                 ldc.i4.0
2420                 ret
2421         }
2422
2423     .method public static  hidebysig 
2424            default int32 test_0_regress_586664 ()  cil managed 
2425     {                                        
2426         // Method begins at RVA 0x20f4       
2427         // Code size 76 (0x4c)               
2428         .maxstack 6                          
2429         .locals init (                       
2430                 float64 V_0,                 
2431                 float64[]       V_1)         
2432         IL_0000:  ldc.r8 1.                  
2433         IL_0009:  ldc.r8 2.                  
2434         IL_0012:  ldc.r8 1.                  
2435         IL_001b:  call float64 class [mscorlib]System.Math::Pow(float64, float64)
2436         IL_0020:  div                                                            
2437         IL_0021:  stloc.0                                                        
2438         IL_0022:  ldc.i4.2                                                       
2439         IL_0023:  newarr [mscorlib]System.Double                                 
2440         IL_0028:  dup                                                            
2441         IL_0029:  ldc.i4.0                                                       
2442         IL_002a:  ldloc.0                                                        
2443         IL_002b:  neg                                                            
2444         IL_002c:  stelem.r8                                                      
2445         IL_002d:  dup                                                            
2446         IL_002e:  ldc.i4.1                                                       
2447         IL_002f:  ldloc.0
2448         IL_0030:  neg
2449         IL_0031:  stelem.r8
2450         IL_0032:  stloc.1
2451         IL_0033:  ldloc.1
2452         IL_0034:  ldc.i4.0
2453         IL_0035:  ldelem.r8
2454         IL_0036:  ldc.r8 -0.5
2455         IL_003f:  bne.un IL_004a
2456
2457         IL_0044:  ldc.i4.0
2458         IL_0045:  br IL_004b
2459
2460         IL_004a:  ldc.i4.1
2461         IL_004b:  ret
2462     }
2463
2464         .method public static int32 test_2_leave_multiple_blocks_from_end ()
2465         {
2466                 .locals init (int32 V_0)
2467
2468                 .try {
2469                         .try {
2470                                 nop
2471                                 nop
2472                                 leave END
2473                         } finally {
2474                                 ldloc.0
2475                                 ldc.i4.1
2476                                 add
2477                                 stloc.0
2478                                 endfinally
2479                         }
2480                         nop
2481                         leave END
2482                 } finally {
2483                         ldloc.0
2484                         ldc.i4.1
2485                         add
2486                         stloc.0
2487                         endfinally
2488                 }
2489 END:
2490                 ldloc.0
2491                 ret
2492         }
2493
2494         .method public static int32 test_3_leave_multiple_blocks_from_hole ()
2495         {
2496                 .locals init (int32 V_0)
2497
2498                 .try {
2499                         .try {
2500                                 ldloc.0
2501                                 brtrue REST
2502                                 leave BEFORE_END
2503 REST:
2504                                 nop
2505                                 nop
2506                                 leave END
2507                         } finally {
2508                                 ldloc.0
2509                                 ldc.i4.1
2510                                 add
2511                                 stloc.0
2512                                 endfinally
2513                         }
2514                         nop
2515                         leave END
2516                 } finally {
2517                         ldloc.0
2518                         ldc.i4.1
2519                         add
2520                         stloc.0
2521                         endfinally
2522                 }
2523 BEFORE_END:
2524                 ldloc.0
2525                 ldc.i4.1
2526                 add
2527                 stloc.0
2528 END:
2529                 ldloc.0
2530                 ret
2531         }
2532
2533         .class nested private auto ansi sealed beforefieldinit Pair`2<TKey,TValue>
2534                    extends [mscorlib]System.ValueType
2535         {
2536                 .field  public  !0 key
2537         .field  public  !1 'value'
2538         }
2539
2540     .method private static hidebysig 
2541            default bool ContentEquals<TKey,TValue> (valuetype Tests/Pair`2<!!TKey, !!TValue> v)  cil managed 
2542     {
2543         .maxstack 8
2544         IL_0000:  ldarga.s 0 
2545         IL_0006:  ldnull 
2546                           constrained. valuetype Tests/Pair`2<!!0,!!1>
2547         IL_0007:  callvirt instance bool class [mscorlib]System.Object::Equals(object)
2548                           ret
2549     }
2550
2551     .method public static hidebysig default int32 test_0_constrained_gshared_595863 () cil managed
2552     {
2553                 .locals init (
2554                 valuetype Tests/Pair`2<string, string>  V_0,
2555                 valuetype Tests/Pair`2<string, string>  V_1)
2556         IL_0000:  ldloca.s 0
2557         IL_0002:  initobj valuetype Tests/Pair`2<string,string>
2558         IL_0008:  ldloc.0 
2559         IL_0009:  stloc.1 
2560         IL_000a:  ldloca.s 1
2561         IL_000c:  ldstr "A"
2562         IL_0011:  stfld !0 valuetype Tests/Pair`2<string,string>::key
2563         IL_0016:  ldloca.s 1
2564         IL_0018:  ldstr "B"
2565         IL_001d:  stfld !1 valuetype Tests/Pair`2<string,string>::'value'
2566         IL_0022:  ldloc.1 
2567         IL_0023:  stloc.0 
2568         IL_0024:  ldloc.0 
2569         IL_0025:  call bool class Tests::ContentEquals<string, string> (valuetype Tests/Pair`2<!!0,!!1>)
2570                           brfalse SUCCESS
2571                           ldc.i4.1
2572                           ret
2573         SUCCESS:
2574                           ldc.i4.0
2575                           ret
2576     }
2577
2578         .method public static default int32 test_0_wrap_non_exception_throws () cil managed
2579         {
2580           .try {
2581                     newobj instance void class [mscorlib]System.Object::'.ctor'()
2582                         throw
2583                   leave IL_0
2584           } catch class [mscorlib]System.Runtime.CompilerServices.RuntimeWrappedException {
2585                   leave IL_0
2586                 }
2587                 IL_0:
2588                 ldc.i4.0
2589                 ret
2590     }
2591
2592         .method public static default int32 test_0_typespec_modopt () cil managed {
2593                 ldtoken class Tests modopt (Tests)
2594                 pop
2595                 ldc.i4.0
2596                 ret
2597         }
2598
2599         .method public hidebysig static int32 SizeOfT<T>() cil managed
2600         {
2601                 .maxstack  8
2602     
2603                 sizeof !!0
2604         ret
2605         }
2606
2607         .method public static default int32 test_1_sizeof_gshared () cil managed {
2608             call   int32 Tests::SizeOfT<int8>()
2609                 ldc.i4.1
2610                 ceq
2611                 ret
2612         }
2613
2614         .method public static default int32 test_1_sizeof_ref () cil managed {
2615             call   int32 Tests::SizeOfT<object>()
2616                 sizeof [mscorlib]System.IntPtr
2617                 ceq
2618                 ret
2619         }
2620
2621   .field static public int32 volatile_int
2622
2623         .method public static default int32 test_5_volatile_load_store () cil managed {
2624                 ldsflda int32 class Tests::volatile_int
2625                 ldc.i4 5
2626                 volatile.
2627                 stind.i4
2628                 ldsflda int32 class Tests::volatile_int
2629                 volatile.
2630                 ldind.i4
2631                 ret
2632         }               
2633
2634     .method public static 
2635            default int32 regress_693905_inner (int32 x, int32 acc)  cil managed 
2636     {
2637         // Method begins at RVA 0x2050
2638         // Code size 17 (0x11)
2639         .maxstack 5
2640         IL_0000:  ldarg.0 
2641         IL_0001:  brtrue.s IL_0005
2642
2643         IL_0003:  ldarg.1 
2644         IL_0004:  ret 
2645         IL_0005:  ldarg.0 
2646         IL_0006:  ldc.i4.1 
2647         IL_0007:  sub 
2648         IL_0008:  ldarg.1 
2649         IL_0009:  ldc.i4.1 
2650         IL_000a:  add 
2651         IL_000b:  starg.s 1
2652         IL_000d:  starg.s 0
2653         IL_000f:  br.s IL_0000
2654
2655     } // end of method Test::f
2656
2657     .method public static 
2658            default int32 test_10_regress_693905 ()  cil managed 
2659         {
2660                 ldc.i4.s 0x0a
2661         ldc.i4.0 
2662         call int32 class Tests::regress_693905_inner(int32, int32)
2663                 ret
2664         }
2665
2666         .method public static
2667                         default int32 test_0_llvm_regress_171 () cil managed
2668         {
2669                 .locals init (
2670                         int32 i
2671                 )
2672
2673                 call int32 Tests::return_1_noinline ()
2674                 ldc.i4.1
2675                 beq L1
2676                 ldc.i4.1
2677                 stloc.s 0
2678                 call int32 Tests::return_1_noinline ()
2679                 ldc.i4.0
2680                 beq L1
2681                 L1:
2682                 ldloc.s 0
2683                 ret
2684         }
2685
2686      .field  public static int32 static_a
2687
2688         .method public static
2689                         default int32 test_4_ldfld_stfld_static () cil managed
2690         {
2691                 ldnull
2692                 ldc.i4 2
2693                 stfld int32 Tests::static_a
2694                 ldnull
2695                 ldfld int32 Tests::static_a
2696                 ldnull
2697                 ldflda int32 Tests::static_a
2698                 ldind.i4
2699                 add
2700                 ret
2701         }
2702 }