summaryrefslogtreecommitdiff
path: root/tests/src/JIT/Methodical/ELEMENT_TYPE_IU/i_flow.il
diff options
context:
space:
mode:
authorPat Gavlin <pagavlin@microsoft.com>2015-06-10 13:11:59 -0700
committerPat Gavlin <pagavlin@microsoft.com>2015-06-10 21:31:41 -0700
commit937180e726dd08c84852a835bd711157769aed2b (patch)
tree8b9c350368cb9f2c57c2fea77d4cc90b51a80dd2 /tests/src/JIT/Methodical/ELEMENT_TYPE_IU/i_flow.il
parentc65178cbb205f8573c84791a31836fb3a7dd237e (diff)
downloadcoreclr-937180e726dd08c84852a835bd711157769aed2b.tar.gz
coreclr-937180e726dd08c84852a835bd711157769aed2b.tar.bz2
coreclr-937180e726dd08c84852a835bd711157769aed2b.zip
Import the first batch of IL tests.
This set of tests is comprised of IL tests that: - only reference APIs in .Net Core's System.Runtime, System.Runtime.Extensions, and System.Threading contracts - compile to a single executable, - and expect no command line arguments at runtime.
Diffstat (limited to 'tests/src/JIT/Methodical/ELEMENT_TYPE_IU/i_flow.il')
-rw-r--r--tests/src/JIT/Methodical/ELEMENT_TYPE_IU/i_flow.il154
1 files changed, 154 insertions, 0 deletions
diff --git a/tests/src/JIT/Methodical/ELEMENT_TYPE_IU/i_flow.il b/tests/src/JIT/Methodical/ELEMENT_TYPE_IU/i_flow.il
new file mode 100644
index 0000000000..3d94dde068
--- /dev/null
+++ b/tests/src/JIT/Methodical/ELEMENT_TYPE_IU/i_flow.il
@@ -0,0 +1,154 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+
+
+
+
+
+
+.assembly extern mscorlib
+{
+}
+.assembly 'qsort'// as "qsort"
+{
+}
+.module 'qsort.exe'
+// MVID: {3433C0F8-3BEA-4168-AB0C-C275EF054928}
+.namespace Test
+{
+ .class private auto ansi AA extends [mscorlib]System.Object
+ {
+ .field public native int m_i
+ .field public native int[0...] m_ai
+
+ .method private hidebysig static int32 Main() il managed
+ {
+ .entrypoint
+ // Code size 134 (0x86)
+ .maxstack 8
+ .locals (class Test.AA, native int i, native int& p1, native int& p2)
+ newobj instance void Test.AA::.ctor()
+ stloc.0
+
+ ldloc.0
+ ldc.i4 0x80000000
+ stfld native int Test.AA::m_i
+
+ ldloc.0
+ ldfld native int Test.AA::m_i
+ ldc.i4 0x7fffffff
+ bgt fail
+
+ ldloc.0
+ ldfld native int Test.AA::m_i
+ ldc.i4 0x80000001
+ bgt fail
+
+ ldloc.0
+ ldfld native int Test.AA::m_i
+ ldc.i4 0x80000001
+ conv.i
+ bgt.un fail
+
+ ldc.i4.0
+ stloc i
+
+ again:
+ ldloc i
+ switch (a1,a2,a3,a4,a5,a6,stop)
+ a1:
+ ldloca i
+ br merge_1
+ a2:
+ ldloca i
+ merge_2:
+ ldloc.0
+ ldfld native int[0...] Test.AA::m_ai
+ ldc.i4.1
+ ldelema [mscorlib]System.IntPtr
+ br final_merge
+ a3:
+ ldloc.0
+ ldflda native int Test.AA::m_i
+ merge_3:
+ ldloca i
+ br final_merge
+ a4:
+ ldloc.0
+ ldflda native int Test.AA::m_i
+ br merge_2
+ a5:
+ ldloc.0
+ ldfld native int[0...] Test.AA::m_ai
+ ldc.i4.1
+ ldelema [mscorlib]System.IntPtr
+ br merge_3
+ a6:
+ ldloc.0
+ ldfld native int[0...] Test.AA::m_ai
+ ldc.i4.1
+ ldelema [mscorlib]System.IntPtr
+ merge_1:
+ ldloc.0
+ ldflda native int Test.AA::m_i
+ final_merge:
+ stloc p1
+ stloc p2
+ ldloc p1
+ ldloc p2
+ beq fail
+
+ ldloc p1
+ ldind.i
+ dup
+ ldloc p2
+ ldind.i
+ add
+ sub
+ ldloc p2
+ ldind.i
+ ceq
+ brfalse fail
+
+ ldloca i
+ ldloc i
+ ldc.i4.1
+ add.ovf.un
+ stind.i
+
+ stop:
+ ldc.i4 0x64
+ ldstr "passed"
+ br exit
+
+ fail:
+ ldc.i4.1
+ ldstr "failed"
+ exit:
+ call void [mscorlib]System.Console::WriteLine(class [mscorlib]System.String)
+ ret
+ } // end of method 'AA::Main'
+
+ .method public hidebysig specialname rtspecialname
+ instance void .ctor() il managed
+ {
+ // Code size 7 (0x7)
+ .maxstack 8
+ ldarg.0
+ call instance void [mscorlib]System.Object::.ctor()
+ ldarg.0
+ ldc.i4.0
+ stfld native int Test.AA::m_i
+ ldarg.0
+ ldc.i4.8
+ newobj instance void native int[0...]::.ctor(int32)
+ stfld native int[0...] Test.AA::m_ai
+ ret
+ } // end of method 'AA::.ctor'
+
+ } // end of class 'AA'
+
+} // end of namespace 'Test'
+
+//*********** DISASSEMBLY COMPLETE ***********************