diff options
author | Pat Gavlin <pagavlin@microsoft.com> | 2015-06-10 13:11:59 -0700 |
---|---|---|
committer | Pat Gavlin <pagavlin@microsoft.com> | 2015-06-10 21:31:41 -0700 |
commit | 937180e726dd08c84852a835bd711157769aed2b (patch) | |
tree | 8b9c350368cb9f2c57c2fea77d4cc90b51a80dd2 /tests/src/JIT/jit64/regress/vsw/153682/test.il | |
parent | c65178cbb205f8573c84791a31836fb3a7dd237e (diff) | |
download | coreclr-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/jit64/regress/vsw/153682/test.il')
-rw-r--r-- | tests/src/JIT/jit64/regress/vsw/153682/test.il | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/tests/src/JIT/jit64/regress/vsw/153682/test.il b/tests/src/JIT/jit64/regress/vsw/153682/test.il new file mode 100644 index 0000000000..53278485dc --- /dev/null +++ b/tests/src/JIT/jit64/regress/vsw/153682/test.il @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +// The first use of a field in a catch was causing an exception in the CLR because +// one of the argument registers for JitHelper::WriteBarrier was not being +// mov'ed to. + +.assembly extern legacy library mscorlib {} +.assembly legacy library test {} + +.class auto ansi sealed nested public save extends [mscorlib]System.Object +{ + .field public static class [mscorlib]System.Exception bb + .method private specialname rtspecialname static + void .cctor() cil managed + { + ret + } +} + +.class public auto ansi sealed a extends [mscorlib]System.Object +{ + + .method public static int32 a() cil managed + { + .entrypoint + .try + { + ldstr "VeryBadException" + newobj instance void [mscorlib]System.Exception::.ctor(string) + throw + leave IL_0027 + } + + catch [mscorlib]System.Exception + { + + IL_000e: stsfld class [mscorlib]System.Exception save::bb + IL_0013: ldsfld class [mscorlib]System.Exception save::bb + + + IL_0018: callvirt instance string [mscorlib]System.Exception::get_Message() + IL_001d: call void [mscorlib]System.Console::WriteLine(string) + + IL_0022: leave IL_0027 + + } + + IL_0027: ldc.i4 100 + ret + } +} |