From 8c184826cc7a613b8848f5c26c9cb60de81121b0 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Wed, 9 Sep 2026 13:20:31 -0700 Subject: [PATCH 1/4] Convert .data tls IL tests to C++/CLI Convert the four active tests using .data tls IL declarations (JIT/Directed/tls/Test-TLS, JIT/Directed/tls/MutualRecurThd-TLS, JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689, JIT/Regression/CLR-x86-EJIT/v1-m10/b07847) to C++/CLI, following the IJW/C++CLI patterns established under src/tests/Interop. - Move the shared native-runtime dependency copy support from src/tests/Interop/Directory.Build.targets into src/tests/Directory.Build.targets so it can be reused outside the Interop tree; keep the Interop-only TestLibraryProjectPath override in Interop/Directory.Build.props. - Add CMakeLists.txt/.cpp native C++/CLI projects and .cs/.csproj managed wrappers for each test. - Native TLS storage uses file-scope __declspec(thread) globals under #pragma unmanaged/managed. - Managed wrappers invoke the native static entry points via UnsafeAccessor/UnsafeAccessorType rather than reflection. - Update Directed_ro.csproj merged-test references from .ilproj to .csproj. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- src/tests/Directory.Build.targets | 12 + src/tests/Interop/Directory.Build.props | 4 + src/tests/Interop/Directory.Build.targets | 23 - src/tests/JIT/Directed/Directed_ro.csproj | 4 +- src/tests/JIT/Directed/tls/CMakeLists.txt | 8 + .../JIT/Directed/tls/MutualRecurThd-TLS.cs | 30 + .../Directed/tls/MutualRecurThd-TLS.csproj | 18 + .../JIT/Directed/tls/MutualRecurThd-TLS.il | 3321 ----------------- src/tests/JIT/Directed/tls/Test-TLS.cs | 17 + src/tests/JIT/Directed/tls/Test-TLS.csproj | 18 + src/tests/JIT/Directed/tls/Test-TLS.il | 25 - .../Directed/tls/cppcli-mutual/CMakeLists.txt | 7 + .../tls/cppcli-mutual/MutualRecurThd-TLS.cpp | 36 + .../JIT/Directed/tls/cppcli/CMakeLists.txt | 7 + .../JIT/Directed/tls/cppcli/TestTLSNative.cpp | 18 + .../Directed/tls/mutualrecurthd-tls.ilproj | 14 - src/tests/JIT/Directed/tls/test-tls.ilproj | 14 - .../CLR-x86-EJIT/v1-m10/b07847/CMakeLists.txt | 9 + .../CLR-x86-EJIT/v1-m10/b07847/b07847.cpp | 21 + .../CLR-x86-EJIT/v1-m10/b07847/b07847.cs | 17 + .../CLR-x86-EJIT/v1-m10/b07847/b07847.csproj | 16 + .../CLR-x86-EJIT/v1-m10/b07847/b07847.il | 50 - .../CLR-x86-EJIT/v1-m10/b07847/b07847.ilproj | 14 - .../V1.2-M01/b03689/CMakeLists.txt | 9 + .../CLR-x86-JIT/V1.2-M01/b03689/b03689.cpp | 18 + .../CLR-x86-JIT/V1.2-M01/b03689/b03689.cs | 17 + .../CLR-x86-JIT/V1.2-M01/b03689/b03689.csproj | 16 + .../CLR-x86-JIT/V1.2-M01/b03689/b03689.il | 25 - .../CLR-x86-JIT/V1.2-M01/b03689/b03689.ilproj | 14 - 29 files changed, 300 insertions(+), 3502 deletions(-) delete mode 100644 src/tests/Interop/Directory.Build.targets create mode 100644 src/tests/JIT/Directed/tls/MutualRecurThd-TLS.cs create mode 100644 src/tests/JIT/Directed/tls/MutualRecurThd-TLS.csproj delete mode 100644 src/tests/JIT/Directed/tls/MutualRecurThd-TLS.il create mode 100644 src/tests/JIT/Directed/tls/Test-TLS.cs create mode 100644 src/tests/JIT/Directed/tls/Test-TLS.csproj delete mode 100644 src/tests/JIT/Directed/tls/Test-TLS.il create mode 100644 src/tests/JIT/Directed/tls/cppcli-mutual/CMakeLists.txt create mode 100644 src/tests/JIT/Directed/tls/cppcli-mutual/MutualRecurThd-TLS.cpp create mode 100644 src/tests/JIT/Directed/tls/cppcli/CMakeLists.txt create mode 100644 src/tests/JIT/Directed/tls/cppcli/TestTLSNative.cpp delete mode 100644 src/tests/JIT/Directed/tls/mutualrecurthd-tls.ilproj delete mode 100644 src/tests/JIT/Directed/tls/test-tls.ilproj create mode 100644 src/tests/JIT/Regression/CLR-x86-EJIT/v1-m10/b07847/CMakeLists.txt create mode 100644 src/tests/JIT/Regression/CLR-x86-EJIT/v1-m10/b07847/b07847.cpp create mode 100644 src/tests/JIT/Regression/CLR-x86-EJIT/v1-m10/b07847/b07847.cs create mode 100644 src/tests/JIT/Regression/CLR-x86-EJIT/v1-m10/b07847/b07847.csproj delete mode 100644 src/tests/JIT/Regression/CLR-x86-EJIT/v1-m10/b07847/b07847.il delete mode 100644 src/tests/JIT/Regression/CLR-x86-EJIT/v1-m10/b07847/b07847.ilproj create mode 100644 src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/CMakeLists.txt create mode 100644 src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/b03689.cpp create mode 100644 src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/b03689.cs create mode 100644 src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/b03689.csproj delete mode 100644 src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/b03689.il delete mode 100644 src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/b03689.ilproj diff --git a/src/tests/Directory.Build.targets b/src/tests/Directory.Build.targets index ed125eb60b15cf..61ee49e15383bb 100644 --- a/src/tests/Directory.Build.targets +++ b/src/tests/Directory.Build.targets @@ -117,6 +117,18 @@ true + + + + + + + + + + diff --git a/src/tests/Interop/Directory.Build.props b/src/tests/Interop/Directory.Build.props index 695e1c13daa1da..fd6f58a5b28f20 100644 --- a/src/tests/Interop/Directory.Build.props +++ b/src/tests/Interop/Directory.Build.props @@ -9,4 +9,8 @@ false $(MSBuildThisFileDirectory)common/ + + + + diff --git a/src/tests/Interop/Directory.Build.targets b/src/tests/Interop/Directory.Build.targets deleted file mode 100644 index 9cb3e1df1a46ed..00000000000000 --- a/src/tests/Interop/Directory.Build.targets +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/src/tests/JIT/Directed/Directed_ro.csproj b/src/tests/JIT/Directed/Directed_ro.csproj index 2a45dcf6270529..2312b33db129ea 100644 --- a/src/tests/JIT/Directed/Directed_ro.csproj +++ b/src/tests/JIT/Directed/Directed_ro.csproj @@ -112,9 +112,9 @@ - + - + diff --git a/src/tests/JIT/Directed/tls/CMakeLists.txt b/src/tests/JIT/Directed/tls/CMakeLists.txt index 9c8b7df4b94be6..488e741d204e86 100644 --- a/src/tests/JIT/Directed/tls/CMakeLists.txt +++ b/src/tests/JIT/Directed/tls/CMakeLists.txt @@ -7,6 +7,14 @@ add_library(usetls ${TEST_LIB_TYPE} testtls.cpp) install (TARGETS usetls DESTINATION bin) +if(CLR_CMAKE_HOST_WIN32) + add_subdirectory(cppcli) +endif() + if(CLR_CMAKE_TARGET_ARCH_LOONGARCH64) add_definitions(-mtls-dialect=desc) endif() + +if(CLR_CMAKE_HOST_WIN32) + add_subdirectory(cppcli-mutual) +endif() diff --git a/src/tests/JIT/Directed/tls/MutualRecurThd-TLS.cs b/src/tests/JIT/Directed/tls/MutualRecurThd-TLS.cs new file mode 100644 index 00000000000000..af4ac0ac7299e9 --- /dev/null +++ b/src/tests/JIT/Directed/tls/MutualRecurThd-TLS.cs @@ -0,0 +1,30 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Runtime.CompilerServices; +using System.Threading; +using Xunit; + +public class MutualRecurThdTLS +{ + [Fact] + public static void TestEntryPoint() + { + Thread[] threads = new Thread[10]; + + for (int i = 0; i < threads.Length; i++) + { + threads[i] = new Thread(() => CallRun(null)); + threads[i].Start(); + } + + foreach (Thread thread in threads) + { + thread.Join(); + } + + } + + [UnsafeAccessor(UnsafeAccessorKind.StaticMethod, Name = "Run")] + extern static void CallRun([UnsafeAccessorType("Thread_EA, MutualRecurThdTLSNative")] object? a); +} diff --git a/src/tests/JIT/Directed/tls/MutualRecurThd-TLS.csproj b/src/tests/JIT/Directed/tls/MutualRecurThd-TLS.csproj new file mode 100644 index 00000000000000..d0b9716546e169 --- /dev/null +++ b/src/tests/JIT/Directed/tls/MutualRecurThd-TLS.csproj @@ -0,0 +1,18 @@ + + + 1 + true + true + true + true + + + PdbOnly + True + + + + + + + diff --git a/src/tests/JIT/Directed/tls/MutualRecurThd-TLS.il b/src/tests/JIT/Directed/tls/MutualRecurThd-TLS.il deleted file mode 100644 index 434eb366e1f991..00000000000000 --- a/src/tests/JIT/Directed/tls/MutualRecurThd-TLS.il +++ /dev/null @@ -1,3321 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - - -.assembly extern System.Console { auto } -.assembly extern xunit.core {} -.assembly extern System.Threading.Thread { auto } -.assembly extern legacy library mscorlib { auto } - - -.assembly 'mutualrecurthd-tls' -{ -} -.data tls FieldData = int32(32) -.data tls FieldData2 = int64(64) - -.class public auto ansi Thread_EA -{ - .field public static int32 TLSFieldData at FieldData - .method public instance void Run() il managed - { - .maxstack 3 - .locals (int32 i) - - IL_0000: ldc.i4 0x1 -stsfld int32 Thread_EA::TLSFieldData -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_0007: ldc.i4 0x1 - IL_000c: add - IL_000d: call void ?Function1_1@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_0013: ldc.i4 0x1 - IL_0018: add - IL_0019: call void ?Function1_2@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_001f: ldc.i4 0x1 - IL_0024: add - IL_0025: call void ?Function1_3@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_002b: ldc.i4 0x1 - IL_0030: add - IL_0031: call void ?Function1_4@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_0037: ldc.i4 0x1 - IL_003c: add - IL_003d: call void ?Function1_5@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_0043: ldc.i4 0x1 - IL_0048: add - IL_0049: call void ?Function1_6@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_004f: ldc.i4 0x1 - IL_0054: add - IL_0055: call void ?Function1_7@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_005b: ldc.i4 0x1 - IL_0060: add - IL_0061: call void ?Function1_8@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_0067: ldc.i4 0x1 - IL_006c: add - IL_006d: call void ?Function1_9@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_0073: ldc.i4 0x1 - IL_0078: add - IL_0079: call void ?Function1_10@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_007f: ldc.i4 0x1 - IL_0084: add - IL_0085: call void ?Function1_11@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_008b: ldc.i4 0x1 - IL_0090: add - IL_0091: call void ?Function1_12@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_0097: ldc.i4 0x1 - IL_009c: add - IL_009d: call void ?Function1_13@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_00a3: ldc.i4 0x1 - IL_00a8: add - IL_00a9: call void ?Function1_14@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_00af: ldc.i4 0x1 - IL_00b4: add - IL_00b5: call void ?Function1_15@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_00bb: ldc.i4 0x1 - IL_00c0: add - IL_00c1: call void ?Function1_16@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_00c7: ldc.i4 0x1 - IL_00cc: add - IL_00cd: call void ?Function1_17@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_00d3: ldc.i4 0x1 - IL_00d8: add - IL_00d9: call void ?Function1_18@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_00df: ldc.i4 0x1 - IL_00e4: add - IL_00e5: call void ?Function1_19@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_00eb: ldc.i4 0x1 - IL_00f0: add - IL_00f1: call void ?Function1_20@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_00f7: ldc.i4 0x1 - IL_00fc: add - IL_00fd: call void ?Function1_21@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_0103: ldc.i4 0x1 - IL_0108: add - IL_0109: call void ?Function1_22@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_010f: ldc.i4 0x1 - IL_0114: add - IL_0115: call void ?Function1_23@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_011b: ldc.i4 0x1 - IL_0120: add - IL_0121: call void ?Function1_24@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_0127: ldc.i4 0x1 - IL_012c: add - IL_012d: call void ?Function1_25@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_0133: ldc.i4 0x1 - IL_0138: add - IL_0139: call void ?Function1_26@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_013f: ldc.i4 0x1 - IL_0144: add - IL_0145: call void ?Function1_27@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_014b: ldc.i4 0x1 - IL_0150: add - IL_0151: call void ?Function1_28@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_0157: ldc.i4 0x1 - IL_015c: add - IL_015d: call void ?Function1_29@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_0163: ldc.i4 0x1 - IL_0168: add - IL_0169: call void ?Function1_30@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_016f: ldc.i4 0x1 - IL_0174: add - IL_0175: call void ?Function1_31@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_017b: ldc.i4 0x1 - IL_0180: add - IL_0181: call void ?Function1_32@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_0187: ldc.i4 0x1 - IL_018c: add - IL_018d: call void ?Function1_33@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_0193: ldc.i4 0x1 - IL_0198: add - IL_0199: call void ?Function1_34@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_019f: ldc.i4 0x1 - IL_01a4: add - IL_01a5: call void ?Function1_35@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_01ab: ldc.i4 0x1 - IL_01b0: add - IL_01b1: call void ?Function1_36@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_01b7: ldc.i4 0x1 - IL_01bc: add - IL_01bd: call void ?Function1_37@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_01c3: ldc.i4 0x1 - IL_01c8: add - IL_01c9: call void ?Function1_38@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_01cf: ldc.i4 0x1 - IL_01d4: add - IL_01d5: call void ?Function1_39@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_01db: ldc.i4 0x1 - IL_01e0: add - IL_01e1: call void ?Function1_40@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_01e7: ldc.i4 0x1 - IL_01ec: add - IL_01ed: call void ?Function1_41@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_01f3: ldc.i4 0x1 - IL_01f8: add - IL_01f9: call void ?Function1_42@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_01ff: ldc.i4 0x1 - IL_0204: add - IL_0205: call void ?Function1_43@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_020b: ldc.i4 0x1 - IL_0210: add - IL_0211: call void ?Function1_44@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_0217: ldc.i4 0x1 - IL_021c: add - IL_021d: call void ?Function1_45@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_0223: ldc.i4 0x1 - IL_0228: add - IL_0229: call void ?Function1_46@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_022f: ldc.i4 0x1 - IL_0234: add - IL_0235: call void ?Function1_47@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_023b: ldc.i4 0x1 - IL_0240: add - IL_0241: call void ?Function1_48@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_0247: ldc.i4 0x1 - IL_024c: add - IL_024d: call void ?Function1_49@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_0253: ldc.i4 0x1 - IL_0258: add - IL_0259: call void ?Function1_50@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_025f: ldc.i4 0x1 - IL_0264: add - IL_0265: call void ?Function1_51@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_026b: ldc.i4 0x1 - IL_0270: add - IL_0271: call void ?Function1_52@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_0277: ldc.i4 0x1 - IL_027c: add - IL_027d: call void ?Function1_53@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_0283: ldc.i4 0x1 - IL_0288: add - IL_0289: call void ?Function1_54@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_028f: ldc.i4 0x1 - IL_0294: add - IL_0295: call void ?Function1_55@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_029b: ldc.i4 0x1 - IL_02a0: add - IL_02a1: call void ?Function1_56@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_02a7: ldc.i4 0x1 - IL_02ac: add - IL_02ad: call void ?Function1_57@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_02b3: ldc.i4 0x1 - IL_02b8: add - IL_02b9: call void ?Function1_58@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_02bf: ldc.i4 0x1 - IL_02c4: add - IL_02c5: call void ?Function1_59@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_02cb: ldc.i4 0x1 - IL_02d0: add - IL_02d1: call void ?Function1_60@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_02d7: ldc.i4 0x1 - IL_02dc: add - IL_02dd: call void ?Function1_61@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_02e3: ldc.i4 0x1 - IL_02e8: add - IL_02e9: call void ?Function1_62@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_02ef: ldc.i4 0x1 - IL_02f4: add - IL_02f5: call void ?Function1_63@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_02fb: ldc.i4 0x1 - IL_0300: add - IL_0301: call void ?Function1_64@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_0307: ldc.i4 0x1 - IL_030c: add - IL_030d: call void ?Function1_65@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_0313: ldc.i4 0x1 - IL_0318: add - IL_0319: call void ?Function1_66@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_031f: ldc.i4 0x1 - IL_0324: add - IL_0325: call void ?Function1_67@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_032b: ldc.i4 0x1 - IL_0330: add - IL_0331: call void ?Function1_68@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_0337: ldc.i4 0x1 - IL_033c: add - IL_033d: call void ?Function1_69@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_0343: ldc.i4 0x1 - IL_0348: add - IL_0349: call void ?Function1_70@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_034f: ldc.i4 0x1 - IL_0354: add - IL_0355: call void ?Function1_1@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_035b: ldc.i4 0x1 - IL_0360: add - IL_0361: call void ?Function1_2@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_0367: ldc.i4 0x1 - IL_036c: add - IL_036d: call void ?Function1_3@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_0373: ldc.i4 0x1 - IL_0378: add - IL_0379: call void ?Function1_4@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_037f: ldc.i4 0x1 - IL_0384: add - IL_0385: call void ?Function1_5@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_038b: ldc.i4 0x1 - IL_0390: add - IL_0391: call void ?Function1_6@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_0397: ldc.i4 0x1 - IL_039c: add - IL_039d: call void ?Function1_7@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_03a3: ldc.i4 0x1 - IL_03a8: add - IL_03a9: call void ?Function1_8@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_03af: ldc.i4 0x1 - IL_03b4: add - IL_03b5: call void ?Function1_9@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_03bb: ldc.i4 0x1 - IL_03c0: add - IL_03c1: call void ?Function1_10@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_03c7: ldc.i4 0x1 - IL_03cc: add - IL_03cd: call void ?Function1_11@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_03d3: ldc.i4 0x1 - IL_03d8: add - IL_03d9: call void ?Function1_12@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_03df: ldc.i4 0x1 - IL_03e4: add - IL_03e5: call void ?Function1_13@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_03eb: ldc.i4 0x1 - IL_03f0: add - IL_03f1: call void ?Function1_14@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_03f7: ldc.i4 0x1 - IL_03fc: add - IL_03fd: call void ?Function1_15@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_0403: ldc.i4 0x1 - IL_0408: add - IL_0409: call void ?Function1_16@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_040f: ldc.i4 0x1 - IL_0414: add - IL_0415: call void ?Function1_17@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_041b: ldc.i4 0x1 - IL_0420: add - IL_0421: call void ?Function1_18@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_0427: ldc.i4 0x1 - IL_042c: add - IL_042d: call void ?Function1_19@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_0433: ldc.i4 0x1 - IL_0438: add - IL_0439: call void ?Function1_20@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_043f: ldc.i4 0x1 - IL_0444: add - IL_0445: call void ?Function1_21@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_044b: ldc.i4 0x1 - IL_0450: add - IL_0451: call void ?Function1_22@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_0457: ldc.i4 0x1 - IL_045c: add - IL_045d: call void ?Function1_23@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_0463: ldc.i4 0x1 - IL_0468: add - IL_0469: call void ?Function1_24@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_046f: ldc.i4 0x1 - IL_0474: add - IL_0475: call void ?Function1_25@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_047b: ldc.i4 0x1 - IL_0480: add - IL_0481: call void ?Function1_26@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_0487: ldc.i4 0x1 - IL_048c: add - IL_048d: call void ?Function1_27@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_0493: ldc.i4 0x1 - IL_0498: add - IL_0499: call void ?Function1_28@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_049f: ldc.i4 0x1 - IL_04a4: add - IL_04a5: call void ?Function1_29@@YAXH@Z(int32) -ldsfld int32 Thread_EA::TLSFieldData -dup -ldc.i4 0x1 -add -stsfld int32 Thread_EA::TLSFieldData - IL_04ab: ldc.i4 0x1 - IL_04b0: add - IL_04b1: call void ?Function1_30@@YAXH@Z(int32) - IL_04b6: call class [mscorlib]System.IO.TextWriter [System.Console]System.Console::get_Out() - IL_04bb: ldstr "one thread finished" - IL_04c0: - IL_04c5: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(class [mscorlib]System.String) - IL_04ca: ret - } - - .method public specialname rtspecialname instance void .ctor() il managed - { - .maxstack 1 - - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } - -} - -.class value sealed public explicit ansi $MultiByte$42 -{ - .pack 1 - .size 42 -} - -.class value sealed public explicit ansi $MultiByte$26 -{ - .pack 1 - .size 26 -} - -.class value sealed public explicit ansi $MultiByte$54 -{ - .pack 1 - .size 54 -} - -.class value sealed public explicit ansi $MultiByte$0 -{ - .pack 1 - .size 0 -} - -.method public static void ?Function1_1@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ret -} - -.method public static void ?Function1_2@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - IL_0038: call void ?Function1_1@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_3@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_2@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_4@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - IL_0038: call void ?Function1_3@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_5@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_4@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_6@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_5@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_7@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_6@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_8@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_7@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_9@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_8@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_10@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_9@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_11@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_10@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_12@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_11@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_13@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_12@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_14@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_13@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_15@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_14@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_16@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_15@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_17@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_16@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_18@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_17@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_19@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_18@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_20@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_19@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_21@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_20@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_22@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_21@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_23@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_22@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_24@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_23@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_25@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_24@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_26@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_25@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_27@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_26@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_28@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_27@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_29@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_28@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_30@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_29@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_31@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_30@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_32@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_31@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_33@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_32@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_34@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_33@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_35@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_34@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_36@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_35@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_37@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_36@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_38@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_37@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_39@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_38@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_40@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_39@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_41@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_40@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_42@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_41@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_43@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_42@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_44@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_43@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_45@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_44@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_46@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_45@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_47@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_46@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_48@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_47@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_49@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_48@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_50@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_49@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_51@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_50@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_52@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_51@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_53@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_52@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_54@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_53@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_55@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_54@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_56@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_55@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_57@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_56@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_58@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_57@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_59@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_58@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_60@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_59@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_61@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_60@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_62@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_61@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_63@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_62@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_64@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_63@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_65@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_64@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_66@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_65@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_67@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_66@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_68@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_67@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_69@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_68@@YAXH@Z(int32) - IL_003d: ret -} - -.method public static void ?Function1_70@@YAXH@Z(int32 A_0) il managed -{ - .maxstack 4 - .locals (unsigned int8[] mem) - - IL_0000: ldarg.0 - IL_0001: newarr [mscorlib]System.Byte - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldc.i4 0x0 - IL_000d: ble IL_002e - - IL_0012: ldloc.0 - IL_0013: ldc.i4 0x0 - IL_0018: ldc.i4 0x0 - IL_001d: stelem.i1 - IL_001e: ldloc.0 - IL_001f: ldarg.0 - IL_0020: ldc.i4 0x1 - IL_0025: sub - IL_0026: ldarg.0 - IL_0027: ldc.i4 0xff - IL_002c: and - IL_002d: stelem.i1 - IL_002e: ldarg.0 - IL_002f: ldc.i4 0x1 - IL_0034: add - IL_0035: starg.s A_0 - IL_0037: ldarg.0 - - IL_0038: call void ?Function1_69@@YAXH@Z(int32) - IL_003d: ret -} - -.class public auto ansi abstract sealed beforefieldinit mutualrecurthd - extends [mscorlib]System.Object -{ - .method public static int32 main() il managed - { - .custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = ( - 01 00 00 00 - ) - .entrypoint - .maxstack 4 - .locals (class [System.Threading.Thread]System.Threading.Thread[] thrd, - class Thread_EA ThdObj, - int32 V_2) - - call class [mscorlib]System.IO.TextWriter [System.Console]System.Console::get_Out() - call class [mscorlib]System.IO.TextWriter [mscorlib]System.IO.TextWriter::Synchronized(class [mscorlib]System.IO.TextWriter) - call void [System.Console]System.Console::SetOut(class [mscorlib]System.IO.TextWriter) - - IL_0000: ldc.i4 0xa - IL_0005: newarr [System.Threading.Thread]System.Threading.Thread - IL_000a: stloc.0 - IL_000b: newobj instance void Thread_EA::.ctor() - IL_0010: stloc.1 - IL_0011: call class [mscorlib]System.IO.TextWriter [System.Console]System.Console::get_Out() - IL_0016: ldstr "test started" - IL_001b: - IL_0020: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(class [mscorlib]System.String) - IL_0025: ldc.i4 0x0 - IL_002a: stloc.2 - IL_002b: br IL_0038 - - IL_0030: ldloc.2 - IL_0031: ldc.i4 0x1 - IL_0036: add - IL_0037: stloc.2 - IL_0038: ldloc.2 - IL_0039: ldc.i4 0xa - IL_003e: bge IL_0064 - - IL_0043: ldloc.0 - IL_0044: ldloc.2 - IL_0045: ldloc.1 - IL_0046: ldftn instance void Thread_EA::Run() - IL_004c: newobj instance void [System.Threading.Thread]System.Threading.ThreadStart::.ctor(class [mscorlib]System.Object,native int) - IL_0051: newobj instance void [System.Threading.Thread]System.Threading.Thread::.ctor(class [System.Threading.Thread]System.Threading.ThreadStart) - IL_0056: stelem.ref - IL_0057: ldloc.0 - IL_0058: ldloc.2 - IL_0059: ldelem.ref - IL_005a: callvirt instance void [System.Threading.Thread]System.Threading.Thread::Start() - IL_005f: br IL_0030 - - IL_0064: ldc.i4 0x0 - IL_0069: stloc.2 - IL_006a: br IL_0077 - - IL_006f: ldloc.2 - IL_0070: ldc.i4 0x1 - IL_0075: add - IL_0076: stloc.2 - IL_0077: ldloc.2 - IL_0078: ldc.i4 0xa - IL_007d: bge IL_008f - - IL_0082: ldloc.0 - IL_0083: ldloc.2 - IL_0084: ldelem.ref - IL_0085: callvirt instance void [System.Threading.Thread]System.Threading.Thread::Join() - IL_008a: br IL_006f - - IL_008f: call class [mscorlib]System.IO.TextWriter [System.Console]System.Console::get_Out() - IL_0094: ldstr "Mututalrecurthd test passed" - IL_0099: - IL_009e: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(class [mscorlib]System.String) - IL_00a3: ldc.i4 0x64 - IL_00a8: ret - } -} \ No newline at end of file diff --git a/src/tests/JIT/Directed/tls/Test-TLS.cs b/src/tests/JIT/Directed/tls/Test-TLS.cs new file mode 100644 index 00000000000000..f3db96c6235483 --- /dev/null +++ b/src/tests/JIT/Directed/tls/Test-TLS.cs @@ -0,0 +1,17 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Runtime.CompilerServices; +using Xunit; + +public class TestTLS +{ + [Fact] + public static int TestEntryPoint() + { + return CallTest(null); + } + + [UnsafeAccessor(UnsafeAccessorKind.StaticMethod, Name = "Test")] + extern static int CallTest([UnsafeAccessorType("TlsTest, TestTLSNative")] object? a); +} diff --git a/src/tests/JIT/Directed/tls/Test-TLS.csproj b/src/tests/JIT/Directed/tls/Test-TLS.csproj new file mode 100644 index 00000000000000..f98548a6d77e23 --- /dev/null +++ b/src/tests/JIT/Directed/tls/Test-TLS.csproj @@ -0,0 +1,18 @@ + + + 1 + true + true + true + true + + + PdbOnly + True + + + + + + + diff --git a/src/tests/JIT/Directed/tls/Test-TLS.il b/src/tests/JIT/Directed/tls/Test-TLS.il deleted file mode 100644 index 53740d10287317..00000000000000 --- a/src/tests/JIT/Directed/tls/Test-TLS.il +++ /dev/null @@ -1,25 +0,0 @@ -.assembly extern legacy library mscorlib {} -.assembly extern xunit.core {} -.assembly 'test-tls' -{ -} -.data tls FieldData = int32(51966) -.class public test { - - .field public static int32 TLSFieldData at FieldData - .method public static int32 main() - { - .custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = ( - 01 00 00 00 - ) - .entrypoint - ldsfld int32 test::TLSFieldData - stsfld int32 test::TLSFieldData - ldc.i4 0x64 - stsfld int32 test::TLSFieldData - ldsfld int32 test::TLSFieldData - ret - } -} - - diff --git a/src/tests/JIT/Directed/tls/cppcli-mutual/CMakeLists.txt b/src/tests/JIT/Directed/tls/cppcli-mutual/CMakeLists.txt new file mode 100644 index 00000000000000..2a317ab50f368d --- /dev/null +++ b/src/tests/JIT/Directed/tls/cppcli-mutual/CMakeLists.txt @@ -0,0 +1,7 @@ +project (MutualRecurThdTLSNative) +include(${CLR_ENG_NATIVE_DIR}/ijw/IJW.cmake) + +add_library(MutualRecurThdTLSNative ${TEST_LIB_TYPE} MutualRecurThd-TLS.cpp) +target_link_libraries(MutualRecurThdTLSNative PRIVATE ${LINK_LIBRARIES_ADDITIONAL}) +add_ijw_msbuild_project_properties(MutualRecurThdTLSNative ijwhost) +install(TARGETS MutualRecurThdTLSNative DESTINATION bin) diff --git a/src/tests/JIT/Directed/tls/cppcli-mutual/MutualRecurThd-TLS.cpp b/src/tests/JIT/Directed/tls/cppcli-mutual/MutualRecurThd-TLS.cpp new file mode 100644 index 00000000000000..1b6b10c3989737 --- /dev/null +++ b/src/tests/JIT/Directed/tls/cppcli-mutual/MutualRecurThd-TLS.cpp @@ -0,0 +1,36 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using namespace System; + +#pragma unmanaged +__declspec(thread) int s_tlsFieldData = 32; +#pragma managed + +static void Function1(int value, int remaining) +{ + array^ memory = gcnew array(value); + memory[0] = 0; + memory[value - 1] = static_cast(value); + + if (remaining > 1) + { + Function1(value + 1, remaining - 1); + } +} + +public ref class Thread_EA +{ +public: + static void Run() + { + s_tlsFieldData = 1; + for (int i = 1; i <= 70; i++) + { + s_tlsFieldData++; + Function1(s_tlsFieldData, i); + } + + Console::WriteLine("one thread finished"); + } +}; diff --git a/src/tests/JIT/Directed/tls/cppcli/CMakeLists.txt b/src/tests/JIT/Directed/tls/cppcli/CMakeLists.txt new file mode 100644 index 00000000000000..48d6929fd76608 --- /dev/null +++ b/src/tests/JIT/Directed/tls/cppcli/CMakeLists.txt @@ -0,0 +1,7 @@ +project (TestTLSNative) +include(${CLR_ENG_NATIVE_DIR}/ijw/IJW.cmake) + +add_library(TestTLSNative ${TEST_LIB_TYPE} TestTLSNative.cpp) +target_link_libraries(TestTLSNative PRIVATE ${LINK_LIBRARIES_ADDITIONAL}) +add_ijw_msbuild_project_properties(TestTLSNative ijwhost) +install(TARGETS TestTLSNative DESTINATION bin) diff --git a/src/tests/JIT/Directed/tls/cppcli/TestTLSNative.cpp b/src/tests/JIT/Directed/tls/cppcli/TestTLSNative.cpp new file mode 100644 index 00000000000000..7cf7077743de66 --- /dev/null +++ b/src/tests/JIT/Directed/tls/cppcli/TestTLSNative.cpp @@ -0,0 +1,18 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +#pragma unmanaged +__declspec(thread) int s_tlsFieldData = 51966; +#pragma managed + +public ref class TlsTest +{ +public: + static int Test() + { + int value = s_tlsFieldData; + s_tlsFieldData = value; + s_tlsFieldData = 100; + return s_tlsFieldData; + } +}; diff --git a/src/tests/JIT/Directed/tls/mutualrecurthd-tls.ilproj b/src/tests/JIT/Directed/tls/mutualrecurthd-tls.ilproj deleted file mode 100644 index 4e6ca1703622a4..00000000000000 --- a/src/tests/JIT/Directed/tls/mutualrecurthd-tls.ilproj +++ /dev/null @@ -1,14 +0,0 @@ - - - 1 - - true - - - PdbOnly - True - - - - - diff --git a/src/tests/JIT/Directed/tls/test-tls.ilproj b/src/tests/JIT/Directed/tls/test-tls.ilproj deleted file mode 100644 index 0853bde29add51..00000000000000 --- a/src/tests/JIT/Directed/tls/test-tls.ilproj +++ /dev/null @@ -1,14 +0,0 @@ - - - 1 - - true - - - PdbOnly - True - - - - - diff --git a/src/tests/JIT/Regression/CLR-x86-EJIT/v1-m10/b07847/CMakeLists.txt b/src/tests/JIT/Regression/CLR-x86-EJIT/v1-m10/b07847/CMakeLists.txt new file mode 100644 index 00000000000000..f353084ce1fed9 --- /dev/null +++ b/src/tests/JIT/Regression/CLR-x86-EJIT/v1-m10/b07847/CMakeLists.txt @@ -0,0 +1,9 @@ +if (CLR_CMAKE_HOST_WIN32) + project (B07847Native) + include(${CLR_ENG_NATIVE_DIR}/ijw/IJW.cmake) + + add_library(B07847Native ${TEST_LIB_TYPE} b07847.cpp) + target_link_libraries(B07847Native PRIVATE ${LINK_LIBRARIES_ADDITIONAL}) + add_ijw_msbuild_project_properties(B07847Native ijwhost) + install(TARGETS B07847Native DESTINATION bin) +endif() diff --git a/src/tests/JIT/Regression/CLR-x86-EJIT/v1-m10/b07847/b07847.cpp b/src/tests/JIT/Regression/CLR-x86-EJIT/v1-m10/b07847/b07847.cpp new file mode 100644 index 00000000000000..1c08629b2794be --- /dev/null +++ b/src/tests/JIT/Regression/CLR-x86-EJIT/v1-m10/b07847/b07847.cpp @@ -0,0 +1,21 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +#pragma unmanaged +__declspec(thread) int s_tlsFieldData = 51966; +#pragma managed + +public ref class TlsTest +{ +public: + static int Test() + { + if (s_tlsFieldData != 51966) + { + return 1; + } + + s_tlsFieldData = 51967; + return s_tlsFieldData == 51967 ? 100 : 1; + } +}; diff --git a/src/tests/JIT/Regression/CLR-x86-EJIT/v1-m10/b07847/b07847.cs b/src/tests/JIT/Regression/CLR-x86-EJIT/v1-m10/b07847/b07847.cs new file mode 100644 index 00000000000000..19251b03454472 --- /dev/null +++ b/src/tests/JIT/Regression/CLR-x86-EJIT/v1-m10/b07847/b07847.cs @@ -0,0 +1,17 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Runtime.CompilerServices; +using Xunit; + +public class B07847 +{ + [Fact] + public static int TestEntryPoint() + { + return CallTest(null); + } + + [UnsafeAccessor(UnsafeAccessorKind.StaticMethod, Name = "Test")] + extern static int CallTest([UnsafeAccessorType("TlsTest, B07847Native")] object? a); +} diff --git a/src/tests/JIT/Regression/CLR-x86-EJIT/v1-m10/b07847/b07847.csproj b/src/tests/JIT/Regression/CLR-x86-EJIT/v1-m10/b07847/b07847.csproj new file mode 100644 index 00000000000000..7045a9e6581ea0 --- /dev/null +++ b/src/tests/JIT/Regression/CLR-x86-EJIT/v1-m10/b07847/b07847.csproj @@ -0,0 +1,16 @@ + + + 1 + true + true + true + true + PdbOnly + True + + + + + + + diff --git a/src/tests/JIT/Regression/CLR-x86-EJIT/v1-m10/b07847/b07847.il b/src/tests/JIT/Regression/CLR-x86-EJIT/v1-m10/b07847/b07847.il deleted file mode 100644 index 8b2383af0aeee1..00000000000000 --- a/src/tests/JIT/Regression/CLR-x86-EJIT/v1-m10/b07847/b07847.il +++ /dev/null @@ -1,50 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly extern xunit.core {} -.assembly extern legacy library mscorlib {} -.assembly b07847 -{ -} - -.data tls FieldData = int32(51966) -.class public test { - - .field public static int32 TLSFieldData at FieldData - .method public static int32 main() - { - .custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = ( - 01 00 00 00 - ) - .entrypoint - ldsfld int32 test::TLSFieldData - ldc.i4 51966 - beq Passed1 - br Failed - -Passed1: - ldc.i4 51967 - dup - stsfld int32 test::TLSFieldData - ldsfld int32 test::TLSFieldData - beq Passed2 - br Failed - -Passed2: - ldstr "Test passed." - call void [System.Console]System.Console::WriteLine(class [mscorlib]System.String) - ldc.i4 100 - ret - -Failed: - ldstr "Test failed." - call void [System.Console]System.Console::WriteLine(class [mscorlib]System.String) - ldc.i4 1 - ret - } -} diff --git a/src/tests/JIT/Regression/CLR-x86-EJIT/v1-m10/b07847/b07847.ilproj b/src/tests/JIT/Regression/CLR-x86-EJIT/v1-m10/b07847/b07847.ilproj deleted file mode 100644 index 54ef21cb720bb9..00000000000000 --- a/src/tests/JIT/Regression/CLR-x86-EJIT/v1-m10/b07847/b07847.ilproj +++ /dev/null @@ -1,14 +0,0 @@ - - - 1 - - true - - - PdbOnly - True - - - - - diff --git a/src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/CMakeLists.txt b/src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/CMakeLists.txt new file mode 100644 index 00000000000000..00af5cc0c28502 --- /dev/null +++ b/src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/CMakeLists.txt @@ -0,0 +1,9 @@ +if (CLR_CMAKE_HOST_WIN32) + project (B03689Native) + include(${CLR_ENG_NATIVE_DIR}/ijw/IJW.cmake) + + add_library(B03689Native ${TEST_LIB_TYPE} b03689.cpp) + target_link_libraries(B03689Native PRIVATE ${LINK_LIBRARIES_ADDITIONAL}) + add_ijw_msbuild_project_properties(B03689Native ijwhost) + install(TARGETS B03689Native DESTINATION bin) +endif() diff --git a/src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/b03689.cpp b/src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/b03689.cpp new file mode 100644 index 00000000000000..7cf7077743de66 --- /dev/null +++ b/src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/b03689.cpp @@ -0,0 +1,18 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +#pragma unmanaged +__declspec(thread) int s_tlsFieldData = 51966; +#pragma managed + +public ref class TlsTest +{ +public: + static int Test() + { + int value = s_tlsFieldData; + s_tlsFieldData = value; + s_tlsFieldData = 100; + return s_tlsFieldData; + } +}; diff --git a/src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/b03689.cs b/src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/b03689.cs new file mode 100644 index 00000000000000..f5ed5f5a94ecdd --- /dev/null +++ b/src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/b03689.cs @@ -0,0 +1,17 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Runtime.CompilerServices; +using Xunit; + +public class B03689 +{ + [Fact] + public static int TestEntryPoint() + { + return CallTest(null); + } + + [UnsafeAccessor(UnsafeAccessorKind.StaticMethod, Name = "Test")] + extern static int CallTest([UnsafeAccessorType("TlsTest, B03689Native")] object? a); +} diff --git a/src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/b03689.csproj b/src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/b03689.csproj new file mode 100644 index 00000000000000..398d9b0dc298fa --- /dev/null +++ b/src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/b03689.csproj @@ -0,0 +1,16 @@ + + + 1 + true + true + true + true + PdbOnly + True + + + + + + + diff --git a/src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/b03689.il b/src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/b03689.il deleted file mode 100644 index eae8a32e598434..00000000000000 --- a/src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/b03689.il +++ /dev/null @@ -1,25 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -.assembly extern legacy library mscorlib {} -.assembly extern xunit.core {} -.assembly 'b03689' -{ -} -.data tls FieldData = int32(51966) -.class public test { - - .field public static int32 TLSFieldData at FieldData - .method public static int32 main() - { - .custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = ( - 01 00 00 00 - ) - .entrypoint - ldsfld int32 test::TLSFieldData - stsfld int32 test::TLSFieldData - ldc.i4 100 - stsfld int32 test::TLSFieldData - ldsfld int32 test::TLSFieldData - ret - } -} diff --git a/src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/b03689.ilproj b/src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/b03689.ilproj deleted file mode 100644 index 54ef21cb720bb9..00000000000000 --- a/src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/b03689.ilproj +++ /dev/null @@ -1,14 +0,0 @@ - - - 1 - - true - - - PdbOnly - True - - - - - From 0e4c23fbb257153bd76efbdd915f23ce59361ebe Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Wed, 9 Sep 2026 15:21:06 -0700 Subject: [PATCH 2/4] Address PR review feedback for TLS C++/CLI tests - Add standard IJW test flags (UnloadabilityIncompatible, IlasmRoundTripIncompatible) to all four converted TLS test projects, matching src/tests/Interop/IJW/Directory.Build.props conventions. - Skip all four tests on Checked CoreCLR builds via [SkipOnCoreClr(..., RuntimeConfiguration.Checked)], tracking the __declspec(thread)/IJW JIT assertion as dotnet/runtime#133538. Add the required TestLibraryProjectPath ProjectReference so the TestLibrary.CoreClrConfigurationDetection condition compiles for these non-merged test projects. - Remove the ineffective '#pragma unmanaged'/'#pragma managed' wrapping around the __declspec(thread) TLS variable declarations: those pragmas only affect function code generation, not data declarations, so they had no effect. - Mark s_tlsFieldData 'volatile' in Test-TLS/b03689/b07847's native TLS globals so the compiler emits the same ldsfld/stsfld access pattern as the original IL tests instead of optimizing away the redundant load/store sequence. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- src/tests/JIT/Directed/tls/MutualRecurThd-TLS.cs | 1 + src/tests/JIT/Directed/tls/MutualRecurThd-TLS.csproj | 5 +++++ src/tests/JIT/Directed/tls/Test-TLS.cs | 1 + src/tests/JIT/Directed/tls/Test-TLS.csproj | 5 +++++ .../JIT/Directed/tls/cppcli-mutual/MutualRecurThd-TLS.cpp | 2 -- src/tests/JIT/Directed/tls/cppcli/TestTLSNative.cpp | 4 +--- .../JIT/Regression/CLR-x86-EJIT/v1-m10/b07847/b07847.cpp | 4 +--- .../JIT/Regression/CLR-x86-EJIT/v1-m10/b07847/b07847.cs | 1 + .../JIT/Regression/CLR-x86-EJIT/v1-m10/b07847/b07847.csproj | 5 +++++ .../JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/b03689.cpp | 4 +--- .../JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/b03689.cs | 1 + .../JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/b03689.csproj | 5 +++++ 12 files changed, 27 insertions(+), 11 deletions(-) diff --git a/src/tests/JIT/Directed/tls/MutualRecurThd-TLS.cs b/src/tests/JIT/Directed/tls/MutualRecurThd-TLS.cs index af4ac0ac7299e9..7dc7f86f3964e4 100644 --- a/src/tests/JIT/Directed/tls/MutualRecurThd-TLS.cs +++ b/src/tests/JIT/Directed/tls/MutualRecurThd-TLS.cs @@ -7,6 +7,7 @@ public class MutualRecurThdTLS { + [SkipOnCoreClr("https://github.com/dotnet/runtime/issues/133538", RuntimeConfiguration.Checked)] [Fact] public static void TestEntryPoint() { diff --git a/src/tests/JIT/Directed/tls/MutualRecurThd-TLS.csproj b/src/tests/JIT/Directed/tls/MutualRecurThd-TLS.csproj index d0b9716546e169..d57941e297ff38 100644 --- a/src/tests/JIT/Directed/tls/MutualRecurThd-TLS.csproj +++ b/src/tests/JIT/Directed/tls/MutualRecurThd-TLS.csproj @@ -5,6 +5,10 @@ true true true + + true + + true PdbOnly @@ -14,5 +18,6 @@ + diff --git a/src/tests/JIT/Directed/tls/Test-TLS.cs b/src/tests/JIT/Directed/tls/Test-TLS.cs index f3db96c6235483..3e5d85dfca41c5 100644 --- a/src/tests/JIT/Directed/tls/Test-TLS.cs +++ b/src/tests/JIT/Directed/tls/Test-TLS.cs @@ -6,6 +6,7 @@ public class TestTLS { + [SkipOnCoreClr("https://github.com/dotnet/runtime/issues/133538", RuntimeConfiguration.Checked)] [Fact] public static int TestEntryPoint() { diff --git a/src/tests/JIT/Directed/tls/Test-TLS.csproj b/src/tests/JIT/Directed/tls/Test-TLS.csproj index f98548a6d77e23..064ca0c464bba3 100644 --- a/src/tests/JIT/Directed/tls/Test-TLS.csproj +++ b/src/tests/JIT/Directed/tls/Test-TLS.csproj @@ -5,6 +5,10 @@ true true true + + true + + true PdbOnly @@ -14,5 +18,6 @@ + diff --git a/src/tests/JIT/Directed/tls/cppcli-mutual/MutualRecurThd-TLS.cpp b/src/tests/JIT/Directed/tls/cppcli-mutual/MutualRecurThd-TLS.cpp index 1b6b10c3989737..be222f94c28b56 100644 --- a/src/tests/JIT/Directed/tls/cppcli-mutual/MutualRecurThd-TLS.cpp +++ b/src/tests/JIT/Directed/tls/cppcli-mutual/MutualRecurThd-TLS.cpp @@ -3,9 +3,7 @@ using namespace System; -#pragma unmanaged __declspec(thread) int s_tlsFieldData = 32; -#pragma managed static void Function1(int value, int remaining) { diff --git a/src/tests/JIT/Directed/tls/cppcli/TestTLSNative.cpp b/src/tests/JIT/Directed/tls/cppcli/TestTLSNative.cpp index 7cf7077743de66..04d1f9dfd73a28 100644 --- a/src/tests/JIT/Directed/tls/cppcli/TestTLSNative.cpp +++ b/src/tests/JIT/Directed/tls/cppcli/TestTLSNative.cpp @@ -1,9 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -#pragma unmanaged -__declspec(thread) int s_tlsFieldData = 51966; -#pragma managed +__declspec(thread) volatile int s_tlsFieldData = 51966; public ref class TlsTest { diff --git a/src/tests/JIT/Regression/CLR-x86-EJIT/v1-m10/b07847/b07847.cpp b/src/tests/JIT/Regression/CLR-x86-EJIT/v1-m10/b07847/b07847.cpp index 1c08629b2794be..40d52ea6fb59d1 100644 --- a/src/tests/JIT/Regression/CLR-x86-EJIT/v1-m10/b07847/b07847.cpp +++ b/src/tests/JIT/Regression/CLR-x86-EJIT/v1-m10/b07847/b07847.cpp @@ -1,9 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -#pragma unmanaged -__declspec(thread) int s_tlsFieldData = 51966; -#pragma managed +__declspec(thread) volatile int s_tlsFieldData = 51966; public ref class TlsTest { diff --git a/src/tests/JIT/Regression/CLR-x86-EJIT/v1-m10/b07847/b07847.cs b/src/tests/JIT/Regression/CLR-x86-EJIT/v1-m10/b07847/b07847.cs index 19251b03454472..3059cb2551631d 100644 --- a/src/tests/JIT/Regression/CLR-x86-EJIT/v1-m10/b07847/b07847.cs +++ b/src/tests/JIT/Regression/CLR-x86-EJIT/v1-m10/b07847/b07847.cs @@ -6,6 +6,7 @@ public class B07847 { + [SkipOnCoreClr("https://github.com/dotnet/runtime/issues/133538", RuntimeConfiguration.Checked)] [Fact] public static int TestEntryPoint() { diff --git a/src/tests/JIT/Regression/CLR-x86-EJIT/v1-m10/b07847/b07847.csproj b/src/tests/JIT/Regression/CLR-x86-EJIT/v1-m10/b07847/b07847.csproj index 7045a9e6581ea0..37cf4a1817de7b 100644 --- a/src/tests/JIT/Regression/CLR-x86-EJIT/v1-m10/b07847/b07847.csproj +++ b/src/tests/JIT/Regression/CLR-x86-EJIT/v1-m10/b07847/b07847.csproj @@ -5,6 +5,10 @@ true true true + + true + + true PdbOnly True @@ -12,5 +16,6 @@ + diff --git a/src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/b03689.cpp b/src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/b03689.cpp index 7cf7077743de66..04d1f9dfd73a28 100644 --- a/src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/b03689.cpp +++ b/src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/b03689.cpp @@ -1,9 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -#pragma unmanaged -__declspec(thread) int s_tlsFieldData = 51966; -#pragma managed +__declspec(thread) volatile int s_tlsFieldData = 51966; public ref class TlsTest { diff --git a/src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/b03689.cs b/src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/b03689.cs index f5ed5f5a94ecdd..45bc9b6c2d5dad 100644 --- a/src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/b03689.cs +++ b/src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/b03689.cs @@ -6,6 +6,7 @@ public class B03689 { + [SkipOnCoreClr("https://github.com/dotnet/runtime/issues/133538", RuntimeConfiguration.Checked)] [Fact] public static int TestEntryPoint() { diff --git a/src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/b03689.csproj b/src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/b03689.csproj index 398d9b0dc298fa..d897d30e20b84a 100644 --- a/src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/b03689.csproj +++ b/src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/b03689.csproj @@ -5,6 +5,10 @@ true true true + + true + + true PdbOnly True @@ -12,5 +16,6 @@ + From f68e7af3c721c0098118f9b9aa509683f885b576 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Wed, 23 Sep 2026 16:39:33 -0700 Subject: [PATCH 3/4] Document why volatile (not #pragma optimize) is used for TLS test fields #pragma optimize has no effect under /clr compilation (confirmed experimentally: identical constant-folded IL with or without the pragma when /O2 is in effect), so volatile is the only way to force these tests to emit the real ldsfld/stsfld sequence they're meant to exercise. Add a comment explaining this so it isn't mistaken for an oversight in review. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- src/tests/JIT/Directed/tls/cppcli/TestTLSNative.cpp | 4 ++++ .../JIT/Regression/CLR-x86-EJIT/v1-m10/b07847/b07847.cpp | 4 ++++ .../JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/b03689.cpp | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/src/tests/JIT/Directed/tls/cppcli/TestTLSNative.cpp b/src/tests/JIT/Directed/tls/cppcli/TestTLSNative.cpp index 04d1f9dfd73a28..d9158a7e4494be 100644 --- a/src/tests/JIT/Directed/tls/cppcli/TestTLSNative.cpp +++ b/src/tests/JIT/Directed/tls/cppcli/TestTLSNative.cpp @@ -1,6 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +// volatile forces every access to be emitted as a real ldsfld/stsfld, +// matching the access pattern of the original IL test this was +// converted from. #pragma optimize has no effect on /clr-compiled code, +// so it cannot be used to suppress this optimization instead. __declspec(thread) volatile int s_tlsFieldData = 51966; public ref class TlsTest diff --git a/src/tests/JIT/Regression/CLR-x86-EJIT/v1-m10/b07847/b07847.cpp b/src/tests/JIT/Regression/CLR-x86-EJIT/v1-m10/b07847/b07847.cpp index 40d52ea6fb59d1..d2555d8ba7344e 100644 --- a/src/tests/JIT/Regression/CLR-x86-EJIT/v1-m10/b07847/b07847.cpp +++ b/src/tests/JIT/Regression/CLR-x86-EJIT/v1-m10/b07847/b07847.cpp @@ -1,6 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +// volatile forces every access to be emitted as a real ldsfld/stsfld, +// matching the access pattern of the original IL test this was +// converted from. #pragma optimize has no effect on /clr-compiled code, +// so it cannot be used to suppress this optimization instead. __declspec(thread) volatile int s_tlsFieldData = 51966; public ref class TlsTest diff --git a/src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/b03689.cpp b/src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/b03689.cpp index 04d1f9dfd73a28..d9158a7e4494be 100644 --- a/src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/b03689.cpp +++ b/src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/b03689.cpp @@ -1,6 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +// volatile forces every access to be emitted as a real ldsfld/stsfld, +// matching the access pattern of the original IL test this was +// converted from. #pragma optimize has no effect on /clr-compiled code, +// so it cannot be used to suppress this optimization instead. __declspec(thread) volatile int s_tlsFieldData = 51966; public ref class TlsTest From e76a3b5ef0475261f51aa41c89104c7963e84b31 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Thu, 24 Sep 2026 10:27:13 -0700 Subject: [PATCH 4/4] Force /Od via CMake instead of volatile for TLS test fields Add a shared disable_optimizations_for_directory() helper to IJW.cmake that strips the inherited per-config optimization flag (e.g. /O2 for Checked) from the directory's COMPILE_OPTIONS and replaces it with /Od, so the compiler doesn't fold away the redundant loads/stores these tests rely on. Just appending /Od without removing /O2 produces a 'D9025: overriding /O2 with /Od' command-line warning. This replaces the earlier 'volatile' workaround in TestTLSNative.cpp, b03689.cpp, and b07847.cpp, which forced a '.volatile' IL prefix not present in the original IL tests. With /Od applied at the CMake level, these fields go back to being plain (non-volatile) __declspec(thread) statics, and the generated IL now matches the original tests exactly. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- eng/native/ijw/IJW.cmake | 13 +++++++++++++ src/tests/JIT/Directed/tls/cppcli/CMakeLists.txt | 2 ++ src/tests/JIT/Directed/tls/cppcli/TestTLSNative.cpp | 10 +++++----- .../CLR-x86-EJIT/v1-m10/b07847/CMakeLists.txt | 2 ++ .../CLR-x86-EJIT/v1-m10/b07847/b07847.cpp | 10 +++++----- .../CLR-x86-JIT/V1.2-M01/b03689/CMakeLists.txt | 2 ++ .../CLR-x86-JIT/V1.2-M01/b03689/b03689.cpp | 10 +++++----- 7 files changed, 34 insertions(+), 15 deletions(-) diff --git a/eng/native/ijw/IJW.cmake b/eng/native/ijw/IJW.cmake index 2529ec596f3bc3..828180f9762dd0 100644 --- a/eng/native/ijw/IJW.cmake +++ b/eng/native/ijw/IJW.cmake @@ -30,6 +30,19 @@ if (CLR_CMAKE_HOST_WIN32) set_target_properties(${targetName} PROPERTIES COMPILE_OPTIONS "${compileOptions}") endfunction() + function(disable_optimizations_for_directory) + # Some IJW tests need to emit fully unoptimized IL + # for us to validate basic JIT behavior. + # MSVC doesn't respect #pragma optimize("", off) for C++/CLI + # so we need to replace the existing optimization settings with /Od. + # We can't just append /Od otherwise we get warnings like the following: + # 'D9025: overriding /O2 with /Od' + get_directory_property(dirCompileOptions COMPILE_OPTIONS) + list(FILTER dirCompileOptions EXCLUDE REGEX "/O[2xd]>?$") + set_directory_properties(PROPERTIES COMPILE_OPTIONS "${dirCompileOptions}") + add_compile_options(/Od) + endfunction() + function(add_ijw_msbuild_project_properties targetName ijwhost_target) # When we're building with MSBuild, we need to set some project properties # in case CMake has decided to use the SDK support. diff --git a/src/tests/JIT/Directed/tls/cppcli/CMakeLists.txt b/src/tests/JIT/Directed/tls/cppcli/CMakeLists.txt index 48d6929fd76608..29af1ba590a3a7 100644 --- a/src/tests/JIT/Directed/tls/cppcli/CMakeLists.txt +++ b/src/tests/JIT/Directed/tls/cppcli/CMakeLists.txt @@ -1,6 +1,8 @@ project (TestTLSNative) include(${CLR_ENG_NATIVE_DIR}/ijw/IJW.cmake) +disable_optimizations_for_directory() + add_library(TestTLSNative ${TEST_LIB_TYPE} TestTLSNative.cpp) target_link_libraries(TestTLSNative PRIVATE ${LINK_LIBRARIES_ADDITIONAL}) add_ijw_msbuild_project_properties(TestTLSNative ijwhost) diff --git a/src/tests/JIT/Directed/tls/cppcli/TestTLSNative.cpp b/src/tests/JIT/Directed/tls/cppcli/TestTLSNative.cpp index d9158a7e4494be..472309365a536c 100644 --- a/src/tests/JIT/Directed/tls/cppcli/TestTLSNative.cpp +++ b/src/tests/JIT/Directed/tls/cppcli/TestTLSNative.cpp @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// volatile forces every access to be emitted as a real ldsfld/stsfld, -// matching the access pattern of the original IL test this was -// converted from. #pragma optimize has no effect on /clr-compiled code, -// so it cannot be used to suppress this optimization instead. -__declspec(thread) volatile int s_tlsFieldData = 51966; +// This test relies on the CMakeLists.txt forcing /Od for this project so +// the redundant load/store below is emitted as real ldsfld/stsfld ops +// instead of being optimized away, matching the access pattern of the +// original IL test this was converted from. +__declspec(thread) int s_tlsFieldData = 51966; public ref class TlsTest { diff --git a/src/tests/JIT/Regression/CLR-x86-EJIT/v1-m10/b07847/CMakeLists.txt b/src/tests/JIT/Regression/CLR-x86-EJIT/v1-m10/b07847/CMakeLists.txt index f353084ce1fed9..f697caafa6cc1a 100644 --- a/src/tests/JIT/Regression/CLR-x86-EJIT/v1-m10/b07847/CMakeLists.txt +++ b/src/tests/JIT/Regression/CLR-x86-EJIT/v1-m10/b07847/CMakeLists.txt @@ -2,6 +2,8 @@ if (CLR_CMAKE_HOST_WIN32) project (B07847Native) include(${CLR_ENG_NATIVE_DIR}/ijw/IJW.cmake) + disable_optimizations_for_directory() + add_library(B07847Native ${TEST_LIB_TYPE} b07847.cpp) target_link_libraries(B07847Native PRIVATE ${LINK_LIBRARIES_ADDITIONAL}) add_ijw_msbuild_project_properties(B07847Native ijwhost) diff --git a/src/tests/JIT/Regression/CLR-x86-EJIT/v1-m10/b07847/b07847.cpp b/src/tests/JIT/Regression/CLR-x86-EJIT/v1-m10/b07847/b07847.cpp index d2555d8ba7344e..fc5fb9a783c649 100644 --- a/src/tests/JIT/Regression/CLR-x86-EJIT/v1-m10/b07847/b07847.cpp +++ b/src/tests/JIT/Regression/CLR-x86-EJIT/v1-m10/b07847/b07847.cpp @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// volatile forces every access to be emitted as a real ldsfld/stsfld, -// matching the access pattern of the original IL test this was -// converted from. #pragma optimize has no effect on /clr-compiled code, -// so it cannot be used to suppress this optimization instead. -__declspec(thread) volatile int s_tlsFieldData = 51966; +// This test relies on the CMakeLists.txt forcing /Od for this project so +// the redundant compare/store below is emitted as real ldsfld/stsfld ops +// instead of being optimized away, matching the access pattern of the +// original IL test this was converted from. +__declspec(thread) int s_tlsFieldData = 51966; public ref class TlsTest { diff --git a/src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/CMakeLists.txt b/src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/CMakeLists.txt index 00af5cc0c28502..76cd7698d31829 100644 --- a/src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/CMakeLists.txt +++ b/src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/CMakeLists.txt @@ -2,6 +2,8 @@ if (CLR_CMAKE_HOST_WIN32) project (B03689Native) include(${CLR_ENG_NATIVE_DIR}/ijw/IJW.cmake) + disable_optimizations_for_directory() + add_library(B03689Native ${TEST_LIB_TYPE} b03689.cpp) target_link_libraries(B03689Native PRIVATE ${LINK_LIBRARIES_ADDITIONAL}) add_ijw_msbuild_project_properties(B03689Native ijwhost) diff --git a/src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/b03689.cpp b/src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/b03689.cpp index d9158a7e4494be..472309365a536c 100644 --- a/src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/b03689.cpp +++ b/src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/b03689.cpp @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// volatile forces every access to be emitted as a real ldsfld/stsfld, -// matching the access pattern of the original IL test this was -// converted from. #pragma optimize has no effect on /clr-compiled code, -// so it cannot be used to suppress this optimization instead. -__declspec(thread) volatile int s_tlsFieldData = 51966; +// This test relies on the CMakeLists.txt forcing /Od for this project so +// the redundant load/store below is emitted as real ldsfld/stsfld ops +// instead of being optimized away, matching the access pattern of the +// original IL test this was converted from. +__declspec(thread) int s_tlsFieldData = 51966; public ref class TlsTest {